Help a n00b

  • Thread starter JamesU
  • Start date
  • #1
JamesU
Gold Member
750
3
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?
 

Answers and Replies

  • #2
dduardo
Staff Emeritus
1,890
3
START->RUN

Type: cmd (assuming your on windows xp)
Type: cd <directory where program is located>
Type: <program name>
 
  • #3
644
1
Use getch() ?
Code:
#include<stdio.h>
#include<conio.h>
int main()
{
    printf("Hello World");
    getch();
    return 0;
}
-- AI
 
  • #4
Programs run until they get to the end of the code, use getchar()
 

Related Threads on Help a n00b

Replies
1
Views
3K
Top