PDA

View Full Version : help a n00b


JamesU
Aug19-05, 10:52 AM
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?

dduardo
Aug19-05, 10:55 AM
START->RUN

Type: cmd (assuming your on windows xp)
Type: cd <directory where program is located>
Type: <program name>

TenaliRaman
Aug19-05, 02:02 PM
Use getch() ?

#include<stdio.h>
#include<conio.h>
int main()
{
printf("Hello World");
getch();
return 0;
}


-- AI

Grotesque Puppet
Aug19-05, 02:46 PM
Programs run until they get to the end of the code, use getchar()