Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to freeze the screen after running a C++ code (so it doesn't disappear)?

Status
Not open for further replies.

MusicMan

Member level 2
Member level 2
Joined
Apr 18, 2007
Messages
42
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,288
Activity points
1,527
i'm trying to program a simple code. like the usual hello world. my problem is after running the code the (black)screen disappears. what i want is after the code is run the screen does not disappear so that i can see the result thanks
 

Re: pls help me dev c++

What I understand your problem: is that, your file (most probably in executable format) is stored in a folder, from where you execute it (from the DOS shell).
 

pls help me dev c++

Add the following code to the end of your main function...

Code:
system("PAUSE");

This is will hold the window open until you press any key

-jonathan
 

pls help me dev c++

AA,
Eiither execute your file from DOS ar add a scanf function at the end of the program, to close the window when you press an ENTER.
BR,
Amr Ali.
 

Re: pls help me dev c++

tnx for your help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top