cmd window closes

W

wax

Hello.

I am using Dev-C++ compiler.
After compile and run the cmd window is not staying open. The programe runs
but the window closes imidiatly.
I s the re any code line that i nedd to modify so i can see the results?

Thanks
 
O

Ondra Holub

wax napsal:
Hello.

I am using Dev-C++ compiler.
After compile and run the cmd window is not staying open. The programe runs
but the window closes imidiatly.
I s the re any code line that i nedd to modify so i can see the results?

Thanks

Something like

getc();
getc();
 
W

White Wolf

red said:
Your answer is here:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

However, put the following at the end of main:

std::string trash;
std::getline(cin, trash);

What's wrong with std::cin.get(); ? IIRC...

--
WW aka Attila
:::
Usenet is like a herd of performing elephants with diarrhea - massive,
difficult to redirect, awe-inspiring, entertaining, and a source of mind -
boggling amounts of excrement when you least expect it. - Gene
Spafford,1992
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top