Re: [SLUG] C++ newbie problems

From: Ronan Heffernan (ronan.heffernan@shawus.com)
Date: Thu Jan 09 2003 - 18:31:11 EST


> Let's not cloud the issue. The original line,
>
> cout << "Welcome to C++!\n";
>
> is just as "correct" as yours. It may be more consistent to teach using
> "endl", but it is no more correct than the line above.
>

It's true that the original line was not incorrect, but the two lines
are not quite functionally identical. The endl also flushes the stream
(like calling fflush(stdout); ) Not a big deal in this case, but
sometimes it is important.

--ronan



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:09:09 EDT