Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cmd window closes

1 view
Skip to first unread message

wax

unread,
Dec 18, 2006, 3:28:22 PM12/18/06
to
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


Ondra Holub

unread,
Dec 18, 2006, 3:39:37 PM12/18/06
to

wax napsal:

Something like

getc();
getc();

red floyd

unread,
Dec 18, 2006, 3:46:49 PM12/18/06
to

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);

White Wolf

unread,
Dec 18, 2006, 6:58:45 PM12/18/06
to

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


0 new messages