Borland c++ compiler problem

Discussion in 'Programming' started by ComputerUser, Aug 8, 2009.

Thread Status:
Not open for further replies.
  1. ComputerUser

    ComputerUser New Member

    Joined:
    Apr 24, 2007
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    0
    While using Relo with borland c++ compiler, the run window does not show up. Only a command prompt window comes up and goes away in a sec before I can see the output! And the same thing happens with turbo c++ ! What's happening?
     
  2. mohitdaksh

    mohitdaksh New Member

    Joined:
    Aug 9, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    For all the boreland compilers(including turbo c) you will have to use getch() before the return statement for the program to display you the output properly.
    You will have to use the header "conio".

    Basically what happens is that whenever you are running your program with boreland tools, it will return to the editor as soon as the program terminates. It will not wait for you to see the output.
    Getch() is used to get single character output from the user. So when you insert getch it will wait for you to press a key and then the program will terminate.
     
    Last edited: Aug 9, 2009
Thread Status:
Not open for further replies.

Share This Page