Hi! how can i save the result screen?

Discussion in 'C++' started by pkbis28, May 30, 2010.

  1. pkbis28

    pkbis28 New Member

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    I write a program to show numbers between 10 and 15 and a black window open, shows my number and then close very quikly. how can i stop it from closing result window?
    I'm using borland c++.
     
  2. spoddar66

    spoddar66 New Member

    Joined:
    May 25, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    this is simple technique that I like to use:

    #include <iostream>
    #include <cstdio>


    int main()
    {
    //do stuff

    std::cout << "\nPress Enter to Continue...";
    getc(stdin);
    return 0;
    }
     
  3. mmondal71

    mmondal71 New Member

    Joined:
    May 25, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    use cin.get() befor return 0.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice