Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help a n00b

  1. Aug 19, 2005 #1

    JamesU

    User Avatar
    Gold Member

    Every time I compile and run a program in Dev-C++ Command prompt only opens for less than a second and closes immediately. can anyone help?
     
  2. jcsd
  3. Aug 19, 2005 #2

    dduardo

    User Avatar
    Staff Emeritus

    START->RUN

    Type: cmd (assuming your on windows xp)
    Type: cd <directory where program is located>
    Type: <program name>
     
  4. Aug 19, 2005 #3
    Use getch() ?
    Code (Text):

    #include<stdio.h>
    #include<conio.h>
    int main()
    {
        printf("Hello World");
        getch();
        return 0;
    }
     
    -- AI
     
  5. Aug 19, 2005 #4
    Programs run until they get to the end of the code, use getchar()
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook




Loading...
Similar Threads for Help n00b Date
Help installing old programs onto new a Win 10 computer Apr 12, 2018
Future Technology: Helpful or Harmful? Jan 13, 2018
Can I upgrade my laptop? Oct 21, 2017
Help with Firefox Jun 13, 2017
Calculators Resistor Calculator - C - Complete n00b Oct 24, 2010