I'd like to add that you should call cin.ignore() like this: std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
This stops input until either the stream is full (meaning that any more input would cause overflow) or a newline is encountered -- it's very useful for a "Press ENTER to continue" message.
If you want "Press a key to continue" ("press any key" isn't a very helpful instruction, given that there isn't an "any" key and some people genuinely get confused by that) then you could use std::cin.get() instead.
I forgot to mention that for the first example (the std::cin.ignore()) one you should include <limits>.