PDA

View Full Version : Newbie to programming I need some help.


Splitz
12-16-2006, 11:13 PM
This is rather odd Ive been compiling stuff but whenever I run it the "cmd" screen pops up for a split second then dissappers. Any suggestions on how to fix this?

ZiNgABuRgA
12-16-2006, 11:20 PM
I don't see what's wrong - for Windows NT, that's supposed to happen.
I assume you're doing C/C++ right? VC++ automatically pauses, but most other compilers don't seem to do that - you can just use something like the getch() function to pause the program. Alternatively, run the program from the command-line instead.

cor3
12-16-2006, 11:29 PM
add this b4 the last bracket if ur doing c++

system ("pause");

Splitz
12-16-2006, 11:38 PM
Odd Ive tried both but no luck.

cor3
12-16-2006, 11:51 PM
wat language are u learning and wat compiler are u using........?

ZiNgABuRgA
12-17-2006, 12:33 AM
If C/C++ he probably isn't #include ing the correct stuff...

Splitz
12-17-2006, 07:33 AM
Oddly enough, this happens any time i run a command in the cmd.

LordCthulu
12-17-2006, 10:25 AM
If you mean going to start, run, and typing in a command, then cmd opens and closes, try running cmd first then doing the command.

methodMAN
12-28-2006, 01:52 PM
This is odd, are you even building a console program?? And, if you are using microsoft visual studio, when you excecute the program within visual c++, in otherwords compile a program, c++ automaticaly has a system pause at the end of the program. If you are using some knock off compiler that could be your problem. But if you you never did mention what you are programming in so i cant really help. Does this happen in every program you make? Check your includes, project type, and source files. its probably something simple. It always is.