System pause not working

broken image

But it will not display message in command line similar to system pause command. It will also wait for user to press any key. For adding some pause in program we can use three different ways. Many times in c++ command line output we require wait for looking output of program. So during debugging it will wait at the end of program so you can see output in your command line output.

broken image
broken image

You can use cin.get() for waiting to user to press any key.