how to get input from console in Xcode 4 in C++ -
how to get input from console in Xcode 4 in C++ -
i want run project in xcode can not input console have checked websites can't it.
#include <iostream> #include <stdio.h> using namespace std; int main (int argc, const char * argv[]) { cout<<"\n"<<argc<<"\n";
i getting ouput 1 don't know how input console
output getting
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 free software, covered gnu general public license, , welcome alter and/or distribute copies of under conditions. type "show copying" see conditions. there absolutely no warranty gdb. type "show warranty" details. gdb configured "x86_64-apple-darwin".tty /dev/ttys000 [switching process 8492 thread 0x0]
1 programme ended exit code: 0
argc
not "input console", it's number of arguments passed programme on command line (and arguments contained in argv
).
if want input console, need read standard in (std::cin
)
see: http://www.cplusplus.com/doc/tutorial/basic_io/
c++ xcode xcode4 arguments
Comments
Post a Comment