program runs for a second

Hello
When I run my program the output comes just for a second.Can I use cin.get();
to stop the output ? If yes where.
I will be thankfull if someone tells me this.
How to keep the console open: http://www.cplusplus.com/forum/articles/7312/
I read this ,I didn't get it
Please explain it simply.
I am very new in C++
why do we use cin.get()
It doesn't mention cin.get, it suggests
std::cin.ignore( std::numeric_limits <std::streamsize> ::max(), '\n' )
which discards all the characters given before a newline so it makes your program waiting until the user presses Enter
Last edited on
where do we use cin.get(); ?
Topic archived. No new replies allowed.