다음을 통해 공유


basic_stringstream 클래스

Describes an object that controls insertion and extraction of elements and encoded objects using a stream buffer of class basic_stringbuf<Elem, Tr, Alloc>.

template < 
   class Elem,  
   class Tr = char_traits<Elem>,  
   class Alloc = allocator<Elem>  
> 
   class basic_stringstream : public basic_iostream<Elem, Tr>

매개 변수

  • Alloc
    The allocator class.

  • Elem
    The type of the basic element of the string.

  • Tr
    The character traits specialized on the basic element of the string.

설명

The template class describes an object that controls insertion and extraction of elements and encoded objects using a stream buffer of class basic_stringbuf<Elem, Tr, Alloc>, with elements of type Elem, whose character traits are determined by the class Tr, and whose elements are allocated by an allocator of class Alloc. The object stores an object of class basic_stringbuf<Elem, Tr, Alloc>.

생성자

basic_stringstream

'basic_stringstream' 형식의 개체를 생성합니다.

형식 정의

allocator_type

The type is a synonym for the template parameter Alloc.

멤버 함수

rdbuf

Returns the address of the stored stream buffer of type pointer to basic_stringbuf<Elem, Tr, Alloc>.

str

Sets or gets the text in a string buffer without changing the write position.

요구 사항

Header: <sstream>

네임스페이스: std

참고 항목

참조

C++ 표준 라이브러리의 스레드 보안

iostream 프로그래밍

iostreams 규칙

기타 리소스

basic_stringstream 멤버

<sstream> 멤버