Home c++ cin.get () in C++ so that the command line does not disappear

cin.get () in C++ so that the command line does not disappear

Author

Date

Category

Introduction Pluses on one book, and there the author does not insert cin.get () anywhere. And I have to, because the command line disappears. Is this related to the C++ version or using the command line?


Answer 1, Authority 100%

everything is fine and should be. The command line after the program is complete must disappear. This can be avoided as inserting cin.get () and IDE tools. For example, if you work in Visual Studio, then run programs via Ctrl + F5 , so the window will not disappear immediately after the program is completed.


Answer 2

as another option, can be added at the end of the main function RETURN 0;.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions