Basic Problem with compiling C - stdio.h no file/dir

Discussion in 'Programming' started by BRUm, Jan 11, 2007.

  1. #1
    Hi,

    I've just started learning C, so I downloaded dev-C++/C compiler. I put this very simple source in:

    
    #include <stdio.h>
    
    void main()
    {
    printf("\nHello World!\n");
    }
    
    Code (markup):
    When I compile I get the errors:

    Help appreciated,

    Thanks,

    Lee.

    EDIT: Nevermind, fixed it.

    But, I have a new question: When I compile a script and run it, the window exits as soon as the functions finish. This means the window flash up and off very quick, and I can't read the results. How can I have the program window stay up until I exit it manually?

    Thanks,

    Lee.
     
    BRUm, Jan 11, 2007 IP
  2. EvilivE

    EvilivE Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you run your executable from the command line you won't have that problem.
     
    EvilivE, Jan 11, 2007 IP
  3. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #3
    Ah I see, thanks.
     
    BRUm, Jan 11, 2007 IP