string - c++ extracting command line arguments -
visual studio 2013 c++. trying is, ask string , extract each letter string. (i know char) dont know how extract each letter, , find out number of chars entered. not know how stop command line window. getchar() gets 1 char user may enter several chars continuously, string. idea? thanks.
int main(int argc, char *argv[]) { string firstarg; if (argc < 1) { //check see if str passed cout << "no string entered...."; } else { firstarg = argv[1]; cout << firstarg; } }
Comments
Post a Comment