Problem with cin
Whenever I compile and run a program (as seen below), after I enter the input, the program stops, and doesn't run the last cout. Is the answer totally obvious, or is there something I've overlooked? It compiles all fine and dandy...
Oh, and by the way, I'm running Windows XP and using Bloodshed Dev-C++ 4
cout <<"Enter a sentence: ";
cin >> message;
cout <<"\nYou said " << message;
Much confused (:confused: ),
Try defining message as
That solution works.. in a way.
It ignores anything after (including as well) a space. Anything else that could solve this?
It works! Hooray!
Thankyou for your time helping me out :)