For issues relating to the std::endl output-only I/O manipulator.
endl is an output-only I/O manipulator. It inserts a newline character into an output sequence os and flushes the stream. It is defined in the header ostream and part of the namespace std. The behavior is equivalent to calling os.put('\n') and then os.flush().
Minimal example:
#include <iostream>
int main()
{
std::cout << "Hello World" << std::endl;
return 0;
}