can someone help me, each time i send my friend a program he says tht the windows goes away once he enters something.
please help.

Recommended Answers

All 8 Replies

Is he running the code from the command line by typing it in, or by double-clicking it in some kind of file browser?

i give him to him by a download link, its a .exe file then he double clicks on it and runs it, but then the program just goes away quickly.

If he runs it from a shell, any error message will remain on screen and then he can tell you the error and you can fix it.

>>i give him to him by a download link, its a .exe file then he double clicks on it and runs it, but then the program just goes away quickly.

But what kind of program is it? If it's a console program, once the program exits, with or without an error, the window will be gone. You either need to change th console program so it pauses...

http://www.dreamincode.net/forums/topic/30581-holding-the-execution-window-open/

or he needs to run it from a console window (i.e. NOT by double-clicking it).

Lol... your code is most likely missing a system("pause");

>> Lol... your code is most likely missing a system("pause");

This is generally frowned upon.

http://www.daniweb.com/forums/thread229044.html

But it will work. just be aware of the risks/drawbacks.

thanks alot for your help, the prblem is fixed

>> Lol... your code is most likely missing a system("pause");

This is generally frowned upon.

http://www.daniweb.com/forums/thread229044.html

But it will work. just be aware of the risks/drawbacks.

Lol... I know the risks, I use Sleep(); from the window.h header. In this case it will work just fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.