Dev C++ compiler question

This is a discussion on Dev C++ compiler question within the C Programming forums, part of the General Programming Boards category; I am trying to compile a program I wrote for a class in DevC++ 4, but when I compile the ...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    4

    Dev C++ compiler question

    I am trying to compile a program I wrote for a class in DevC++ 4, but when I compile the code, the console window flashes across the screen, but disappears almost instantely, so I can't view the output. Did I miss a setting when I went to compile or is there another issue here?

  2. #2
    Registered User
    Join Date
    Oct 2007
    Location
    Norway
    Posts
    16
    The window closes as soon as you return from main. One way to fix this would be calling getchar before returning.

    Code:
    getchar();

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,668
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dev C++ compiler question
    By exluddite in forum C++ Programming
    Replies: 1
    Last Post: 10-16-2004, 09:31 PM
  2. Compiler Question.
    By RealityFusion in forum C++ Programming
    Replies: 2
    Last Post: 07-20-2004, 07:52 AM
  3. C/C++ Compiler Question
    By Unregistered in forum C++ Programming
    Replies: 11
    Last Post: 07-09-2002, 02:09 AM
  4. newbie question about using windows app in Dev C++
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 06-09-2002, 10:50 PM
  5. Question: Which Compiler????
    By MaBo in forum C Programming
    Replies: 5
    Last Post: 06-04-2002, 11:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21