How do I make a C++ program close before shutting down?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EthanS

    How do I make a C++ program close before shutting down?

    My program doesn't give me time to read it! I have tried writing [return 0;] at the end but it doesn't work, and most tutorials are outdated, since I am using the newest version.
  • Alex T
    New Member
    • Oct 2010
    • 29

    #2
    Press Ctrl+F5 during debug

    or add the following lines at the end before "return 0;":

    char response;
    cin >> response;

    Comment

    • johny10151981
      Top Contributor
      • Jan 2010
      • 1059

      #3
      The question is not clear enough to answer. What do you mean by

      "close before shutting down"

      What you want to shut down or what you want to close?

      Comment

      • EthanS
        New Member
        • Nov 2010
        • 1

        #4
        Ok thanks that works.
        I also found out that I could use cin.get();

        Comment

        Working...