Well, I tried this code. It works untill the final loop, than it crush.
getline(cin, str, '\n'); //I also tried without '\n'
//now replacing every 2 ' ' with one ' '
while...
Type: Posts; User: dafa
Well, I tried this code. It works untill the final loop, than it crush.
getline(cin, str, '\n'); //I also tried without '\n'
//now replacing every 2 ' ' with one ' '
while...
How can I ignore extra spaces in the input?
I am not alowd to use flush, fflush or anything like that.
I have to get a line (optionaly with too many spaces) and than separate to words (with no...