dumb question

This is a discussion on dumb question within the C Programming forums, part of the General Programming Boards category; I am learing C (used Fortran for many years). I compiled a simple program on a free compiler I got ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    1

    dumb question

    I am learing C (used Fortran for many years). I compiled a simple program on a free compiler I got off the internet, the problem is that the output screen automatically closes as soon as the program stops writing to the screen. Fortran does not do this. Is there some type of pause statement I need to put in or is it a compiler issue. The compiler I am using is Miracle C, are there any other good free compulers? Thanks in advance.
    Travis

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    see the faq: http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    as it says, look for that special run button in your ide, or run the compiled program from a command line. another option, on windows (and windows only) is to use system("pause");. another option is getch() or getchar().

  3. #3
    Cogito Ergo Sum
    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    463
    For C

    CYGWIN is the best if you are running Windows

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,337
    Miracle C is crap compared to, well pretty much everything else.

    Dev-C++ (make sure you get the compiler AND IDE)
    Code::blocks (make sure you get the compiler AND IDE)
    Microsoft Visual Studio Express + platform SDK
    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. very dumb question.
    By Blips in forum C++ Programming
    Replies: 14
    Last Post: 11-08-2005, 08:37 AM
  2. Dumb question
    By dragon2309 in forum C Programming
    Replies: 18
    Last Post: 10-29-2005, 03:27 PM
  3. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  4. Sorry for a dumb question.
    By Vanished in forum C++ Programming
    Replies: 7
    Last Post: 11-23-2002, 11:39 AM
  5. another dumb question - loop not working?
    By Captain Penguin in forum C++ Programming
    Replies: 8
    Last Post: 10-06-2002, 10:15 PM

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