Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7368251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:38:35+00:00 2026-05-29T03:38:35+00:00

i want to run project in xcode but i can not get input from

  • 0

i want to run project in xcode but i can not get input from console i have checked websites but i can’t get it.

#include <iostream>
#include <stdio.h>
using namespace std;
int main (int argc, const char * argv[])
{

cout<<"\n"<<argc<<"\n";  

i am getting the ouput as 1 but i don’t know how to get input from the console

output that i am getting is

GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys000
[Switching to process 8492 thread 0x0]

1
Program ended with exit code: 0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T03:38:36+00:00Added an answer on May 29, 2026 at 3:38 am

    argc is not “input from the console”, it’s the number of arguments passed to your program on the command line (and those arguments are contained in argv).

    If you want to get input from the console, you would need to read from standard in (std::cin)

    See: http://www.cplusplus.com/doc/tutorial/basic_io/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run a background task that reads input from a TextReader and
I have an XCode project built as a Cocoa single document application (it's not
I want to automatically add files to an Xcode project that is created from
I have a fairly complex Xcode project and I want to add Qt to
We run a project in which we want to solve with test driven development.
I want to run a weekly batch process in an asp.net page. How can
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I want to run an Apache on my local machine since I can only
When I open an existing iPad project in Xcode and Build and Run it,
In Xcode, I want to set the project bundle version to the git hash,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.