12-13-2009, 08:27 AM
(12-13-2009, 06:01 AM)se7en Wrote: "\n" is the same as endl
Actually, std::endl is the same as doing:
Code:
"\n" << std::flush
Since std::endl also flushes the current buffer to the screen, useful if you want to definitely make sure you see what you are pushing into the stream, but "\n" would probably be better if you were adding a lot of little strings in a loop since you could flush the buffer once you finish the loop instead of having std::endl flush the buffer after every iteration.
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.