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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -