次の方法で共有


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

参照

関連項目

iostream プログラミング

iostreams の規則