I am trying to run a standard win32 console application, e.g. simple "Hello World" style app just to test this stupid "bug" or whatever it is.
Does anyone know how to use the cin >> statement to store a " " character into a string variable
using namespace std;
void main ()
cin >> somestring;
cout << somestring;
cin >> somechar;
when the cin statement asks for text it will go fine unless a space is entered into the string. When a space is present hitting enter after the string crashes the program and it does not even run the cout statement. There is no error, it just exits. I tried it with a character array too and it did the same thing.
I am using Microsoft Visual Studio.net through my school and it is a horrible program. I see source code all the time where this problem isn't an issue, should i switch compilers?