Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) nl

 

nl is a stream manipulator, similar to std::endl, except that nl does not flush the stream.

 

#include <iostream>

//From http://www.richelbilderbeek.nl/CppNl.htm
std::ostream& nl(std::ostream& os)
{
  return os << '\n';
}

int main()
{
  std::cout
    << "Hello"
    << nl
    << "world"
    << nl;
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict