Thread: How to view the programme before it disappears

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    1

    Question How to view the programme before it disappears

    Whenever I compile and run a programme, a black screen appears showing what the programme has done. But before I can even read a single word on that screen it just vanishes immediately.

    Some one told me that this might be due to very fast processing speeds of contemporary CPUs.

    So is there any way I can at least see what my programme has done i.e. can someone tell me how to make that black screen not go away immediately.

    I have heard that you can type getch() at the end of your programme, which means that the output screen does not go away until you press a character.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Yes, you can use getch() or getchar(). Or, you can run the program from the command prompt (instead of running it from your IDE), and the command prompt won't go away.

    Todd
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tree View control not appearing
    By Garfield in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2004, 01:47 PM
  2. Gui Programme does'nt Compiles from DOS
    By Shadowhunt in forum C++ Programming
    Replies: 1
    Last Post: 06-06-2003, 08:05 AM
  3. Set View Position in CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 05-21-2002, 09:27 PM
  4. Determining Active View :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-25-2002, 07:34 PM
  5. How to open two view i MFC
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 02-05-2002, 04:13 PM