I've been doing C++ for 2 days now and love it. I'd like to know what these lines do. Also, what are 'game loops'? Can someone please explain this in-depth. I'd appreciate an answer! :P
Those two lines both do something similar: they get a single character from cin and throw it away.
This is a common effort to make sure the input stream is properly synchronized to the number of times the user has pressed the ENTER key.
getline() reads an entire line of text and the ENTER key (which it tosses)
cin >> foo only reads a foo, nothing more. So you must get() or ignore() the ENTER key.
A "game loop" is the same as an "event loop". All 'normal' GUI programs operate by waiting for something to happen, then calling the appropriate routine to handle it. When you write a game, you need to do this yourself, because the way you respond to events will differ depending on your game.