🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

somebody help me

Started by
3 comments, last by defiant147 22 years, 7 months ago
This is probably a stupid Question but, When I run a C++ program (the tutorials, from a book, etc) the window won''t stay open and they close. What is wrong, did I miss something? I keep reading that that windows should say "press any key to continue". What I want to know is why the MSDOS window won''t stay open. I have only seen "hello world" flashed on the screen for a second at most. I have tried to figure out what''s wrong but can''t. Remember I am new to C++ when you''re responding.
Advertisement
Put either system("pause") or getch() at the end of your program.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
It''s meant to do that. Put a call to "getchar()" near the end of main (include stdio.h).

[Resist Windows XP''s Invasive Production Activation Technology!]
this happened to me too, i figured out how to solve this problem but i forgot how. It has to do with how you''re compilling it like as a release or debug etc etc. I cant quite remember
Thanks everyone, that answered my question.
You couldn''t believe how many things I did trying to figure it out. I can actually see "HelloWorld" now, not just it being flashed for a second across the screen.
thanks again,
defiant147

This topic is closed to new replies.

Advertisement