No, when you use cin, it stops at the first whitespace character. If you use:
getline(cin,input,'\n');
It'll take a whole line of input.
Edit: correction, I meant when you use >>
Type: Posts; User: ZapX.net
No, when you use cin, it stops at the first whitespace character. If you use:
getline(cin,input,'\n');
It'll take a whole line of input.
Edit: correction, I meant when you use >>
Another problem I see is, what if more than 50 words are entered? It'd be so easy to do a buffer overflow in your program. You might want to use vectors or deques.
I'm unsure what those scramble...