parsing - Splitting a String C++ -


i entering type of input command line :

mynameis "jason roger"

i want have mynameis , jason roger in 2 different strings. failed in printing input. when use

  string command;    cin>>command   cout<<command<<endl; 

i

mynameis 

how can fix this? thanks.

the >> operator reads input stream (cin, here) until hits whitespace character. might want @ getline function instead, need split string manually.


Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -