Many C++ books contain example code like this...
std::cout << \"Test line\" << std::endl;
...so I\'ve always done that too. But
They will both write the appropriate end-of-line character(s). In addition to that endl will cause the buffer to be committed. You usually don't want to use endl when doing file I/O because the unnecessary commits can impact performance.