sunslayer commented on a Page, First c++, calculator  -  Mar 10, 2010

using any system() command in general is a bad habit, for one it is OS bound, meaning that not all OS' support it and if u try to compile it on one without it u will get an error, its also a security risk because if someone hacked your computer and changed pause.exe to something malicious you could harm your computer.

using cin.get() is not exactly like system("pause"), but it can be used to accomplish all the same tasks

also in your code, u have 'a' being a global variable but its only used in main()

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.