Quote Originally Posted by Todd Burch View Post
1) endl is NOT the same as '\n'. endl will give you a newline character, but it will also flush the output stream. This takes up time - major time with lots of data.
Yes, indeed. If you use '\n' instead of endl when writing lots of data to a file, you will save significant amount of time because of the reduced amount of file-flushing.