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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -