Share via


ends (標準 C++ ライブラリ)

文字列を終了します。

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

パラメーター

  • _Elem
    要素の型。

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

  • _Tr
    文字セット。

戻り値

basic_ostream 型のオブジェクト。

解説

マニピュレーターは _Ostr**.**設定 (_Elem () '\0') を呼び出します。これは _Ostr.を返します

使用例

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

int main( ) 
{
   using namespace std;
   cout << "a";
   cout << "b" << ends;
   cout << "c" << endl;
}
  

必要条件

ヘッダー: <ostream>

名前空間: std

参照

関連項目

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

入出力ストリームの規則