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


Terminates a line and flushes the buffer.

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

The element type.


An object of type basic_ostream.


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;

Header: <ostream>

Namespace: std

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