C++ Compiler

Discussion in 'C++' started by pgairo, Oct 24, 2007.

  1. pgairo

    pgairo New Member

    Joined:
    Oct 24, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi, i have a c++ 5 compiler when compiling my programs the output is display for few seconds and than it is closed. Please is there setting on the compiler that i can change so that the output is displayed longer

    Cheers..
    Patrick
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Before the last statement have a user input using scanf, getch / getche so that it does not disappear before you see the output.
     
  3. pgairo

    pgairo New Member

    Joined:
    Oct 24, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Please can you write the commands so that i can see what you mean.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Code:
    int main()
    {
        cout<<"After the last output"<<endl;
        getch();
    }
     
  5. pgairo

    pgairo New Member

    Joined:
    Oct 24, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Thanks so much Shabbir for your help here and may our good Lord above continue to bless as you continue to share your knowledge with us.
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    I just realized that it was not in the right forum and I have moved the thread to C-C++ forum
     

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