Freigeben über


basic_ostream::put

Puts a character in a stream.

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

Parameters

  • _Ch
    A character.

Return Value

A reference to the basic_ostream object.

Remarks

The unformatted output function inserts the element _Ch. It returns *this.

Example

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

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

Requirements

Header: <ostream>

Namespace: std

See Also

Reference

basic_ostream Class

iostream Programming

iostreams Conventions

Other Resources

basic_ostream Members