다음을 통해 공유


endl

Terminates a line and flushes the buffer.

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

매개 변수

  • _Elem
    요소 형식입니다.

  • _Ostr
    basic_ostream 형식의 개체입니다.

  • _Tr
    Character traits.

반환 값

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>

네임스페이스: std

참고 항목

참조

iostream 프로그래밍

iostreams 규칙