So recently I got back into programming with C++ in Visual Studio 2013 Express. I am just a beginner, so I searched up some easy exercises and started playing around with if-else statements.
when I use the debug tool to run the program, it ends the program whenever I enter the score
Debug run does not keep window opened after program finishes. It is ntended to find errors in program and if program finished, there is no need to keep it open anymore.
Either place a breakpoint at closing brace of main, or run without debugging.
Ok, I thought the cin.get(); line would make the program wait for me to press enter, then it would end. Sorry if I act like a nob, its because I am one.
I thought the cin.get(); line would make the program wait for me to press enter
It might. Or might not. Depending on state of input buffer.
In your case there is an unread character here (newline — operator>> does not extract whitespace characters after actual value).