I'm new to programming with C++...
Anyways, Windows seems to close the DOS executable whenever I choose to Compile & Run my program. It apears for like a few seconds and quickly closes it, anyone know how to disable that?
This is a discussion on DOS Program Question within the C++ Programming forums, part of the General Programming Boards category; I'm new to programming with C++... Anyways, Windows seems to close the DOS executable whenever I choose to Compile & ...
I'm new to programming with C++...
Anyways, Windows seems to close the DOS executable whenever I choose to Compile & Run my program. It apears for like a few seconds and quickly closes it, anyone know how to disable that?
Oke,You're programming in wich IDE?,Wich enviroment?,Wich
type of program?
run your program from a console window.
hello, internet!
How would I do that on Dev-C++?
Im using dev c++ and getch() works. Heres an example.
Code:#include <iostream> #include <conio.h> // for getch() int main () { cout << "crap"; getch(); // waits for user to press any key return 0; }
C++ Rules!!!!
------------
Microsoft Visual Studio .NET Enterprise
Code:#include <stdio.h> #include <conio.h> #include <stdlib.h> main(){ printf("Do stuff\n"); getch(); /*or*/ system("pause"); }
Thanks![]()