system("PAUSE");

I've heard that using system("PAUSE"); makes your program vulnerable, and that I should use something else to keep the console open. Why is it bad exactly, and what alternatives should I use instead?
It's bad because anyone can make "pause" do anything they want to.

There's a whole sticky thread on the topic. Look here : http://cplusplus.com/forum/beginner/1988/
Last edited on
system("PAUSE"); usage instructions:

USE IT FOR:
- homework
- learning how the language works

DON'T USE IT FOR:
- anything else

As for haters, they gonna hate. Until there's an std::pause() utility, I personally favor system("PAUSE"); to any language hack they might suggest.
closed account (zb0S216C)
Look at this link: http://stackoverflow.com/questions/900666/system-calls-in-c-and-their-roles-in-programming

Wazzak
Thanks, I will definitely look at these resources!
Topic archived. No new replies allowed.