|
|
system("pause");
>system("pause"); This is all kinds of wrong. First, while system is a standard function and thus portable, the argument you pass to it cannot be portable because it relies on the system command interpreter. If you move the code to a different system, the command interpreter will probably be different (or not available!) and system("pause") could do something completely different or break. Second, system is unsafe because it doesn't verify that the pause program is the one supplied by the system. It may be a malicious program bent on wreaking havoc. Third, system is sloooooooow. Dreadfully, painfully, agonizingly sloooooooow. This isn't really a problem if you call it once, like here, but system should really be avoided in favor of better alternatives. |