basic_streambuf::sputc

문자는 스트림에 배치합니다.

int_type sputc(
   char_type _Ch
);

매개 변수

  • _Ch
    문자입니다.

반환 값

성공 하면 문자를 반환 합니다.

설명

경우는 write position 사용할 수 있는 멤버 함수 저장소 _Ch 쓰기 위치에 출력 버퍼에 대 한 다음 포인터 증가 및 반환 traits_type::to_int_type(_Ch).그렇지 않으면 반환 오버플로(_Ch).

예제

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

int main( ) 
{
   using namespace std;

   int i = cout.rdbuf( )->sputc( 'a' );
   cout << endl << ( char )i << endl;
}
  

요구 사항

헤더: <streambuf>

네임 스페이스: std

참고 항목

참조

basic_streambuf Class

iostream 프로그래밍

iostreams 규칙