May 6, 2010 at 1:07pm
Hello everybody
i have the following question:
"Hello world" to cin and the following code
string str,msg;
getline(cin,str)
stringstream ss(str);
char c;
while(ss >> noskipws >> c)
msg += c;
results in msg = "Hello World"
but if i use string c instead of char c, msg is empty
Does anyone on you know why ?
Kind regards
Thomas