I am a new C++ programmer. I started out using a Borland compiler, which I found worked rather well. I just made a few simple things, including a nice ASCII version of tic-tack-toe with computer A.I. But I recently had the oppurtunity to get Visual Studio .Net with all the newest Microsoft tools.
Well, after much toil, I figured out how to make a simple, blank console program. Then I typed in some code. This code, to be exact:
Seems, simple, right? But what happens is, it outputs "1,", then lets me input something... the the program ends. Too fast to even see if it ouputs a 2.
int a, b;
After staring at the code for about an hour, I decided to try it in Borland and the same thing happened! I opened up my old tic tac toe program and it worked fine (although I don't remember using cin for that...) Am I going crazy??? What's wrong here?? Anyone have a similar problem??