Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

endl

Terminates a line and flushes the buffer.

template class<_Elem, _Tr>
   basic_ostream<_Elem, _Tr>& endl( 
      basic_ostream<_Elem, _Tr>& _Ostr 
   );
_Elem

The element type.

_Ostr

An object of type basic_ostream.

_Tr

Character traits.

An object of type basic_ostream.

The manipulator calls _Ostr.put(_Ostr. widen('\n')), and then calls _Ostr.flush. It returns _Ostr.

// ostream_endl.cpp
// compile with: /EHsc
#include <iostream>

int main( ) 
{
   using namespace std;
   cout << "testing" << endl;
}
testing

Header: <ostream>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.