• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

anyone know that piece of code to make a program stay open in dos?

Peks

Member
when you run a program from the stand alone exe, and not through the compiler, the program closes after its done. my teacher showed us some code that was something like "cin>>something" but i cant remember what it is..its really short. if anyone knows could they post it here? thanks!
 
hmm from wut i remember from my AP CS class in HS..my teacher told us to use: the line " getch (); " i also think you need to include the conio.h header file. hope that helps
 
Originally posted by: vexingv
hmm from wut i remember from my AP CS class in HS..my teacher told us to use: the line " getch (); " i also think you need to include the conio.h header file. hope that helps
AFAIK that's a windows thing, std::cin will work anywhere.
 
Back
Top