次の方法で共有


basic_ostream::put

ストリームに文字を設定します。

basic_ostream<_Elem, _Tr>& put(
    char_type _Ch
);

パラメーター

  • _Ch
    文字。

戻り値

basic_ostream のオブジェクトへの参照。

解説

書式なし出力関数は _Ch要素を挿入します。これは *thisを返します。

使用例

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

int main( ) 
{
   using namespace std;
   cout.put( 'v' );
   cout << endl;
   wcout.put( L'l' );
}
  

必要条件

ヘッダー: <ostream>

名前空間: std

参照

関連項目

basic_ostream Class

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

入出力ストリームの規則