|
-
October 15th, 2010, 06:59 AM
#5
Re: Beginner's use of system("pause");
Actually, I use a "pause()" function too (for the sake of abstraction), but the body of said function is just system("Pause"). I find it is the best solution as the Windows provided pause is really "Press any key to continue" whereas Laserlight's is more tightly stream bound (and may have some un-intended side-effects on your input stream).
The day I'll port my program, I'll only have one function to change, Probably to Laserlight's implementation
Is your question related to IO?
Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|