Many C++ books contain example code like this...
std::cout << \"Test line\" << std::endl;
...so I\'ve always done that too. But
The std::endl manipulator is equivalent to '\n'. But std::endl always flushes the stream.
std::endl
'\n'
std::cout << "Test line" << std::endl; // with flush std::cout << "Test line\n"; // no flush