Share via


endl

行を終了し、バッファーをフラッシュします。

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

パラメーター

  • _Elem
    要素の型。

  • _Ostr
    basic_ostream 型のオブジェクト。

  • _Tr
    文字セット。

戻り値

basic_ostream 型のオブジェクト。

解説

マニピュレーターはを呼び出します _Ostr**.設定 (_Ostr.** 配分します () を**'\n')、_Ostr.**フラッシュを呼び出します。_Ostr が返されます。

使用例

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

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

必要条件

ヘッダー: <ostream>

名前空間: std

参照

関連項目

入出力ストリームのプログラミング

入出力ストリームの規則