Apart from what others have said, if you are using this in Windows OS (Visual Studio for example as an IDE) I would recommend that you use this Windows-only command.
system("pause");
Other answers also work, but this is a single function to pause the application. Plus this will also do what Clark's code does, it will automatically show the message to continue.
Only downside is that it is not a cross-platform feature. It is Windows-only.