std:: streamsize
From cppreference.net
|
헤더 파일에 정의됨
<ios>
|
||
|
typedef
/*implementation-defined*/
streamsize
;
|
||
std::streamsize
타입은 I/O 작업에서 전송된 문자 수나 I/O 버퍼의 크기를 나타내는 데 사용되는 부호 있는 정수 타입입니다. 이는
std::size_t
의 부호 있는 대응 타입으로, POSIX 타입
ssize_t
와 유사하게 사용됩니다.
참고 사항
std::strstreambuf
의 생성자를 제외하고,
std::streamsize
의 음수 값은 절대 사용되지 않습니다.
예제
이 코드 실행
#include <iostream> #include <type_traits> static_assert(std::is_signed_v<std::streamsize>); int main() { std::cout << sizeof(std::streamsize) << '\n'; }
가능한 출력:
8
참고 항목
|
마지막 비형식화 입력 작업으로 추출된 문자 수를 반환합니다
(
std::basic_istream<CharT,Traits>
의 public 멤버 함수)
|
|
|
지정된 문자를 찾을 때까지 문자를 추출하고 버립니다
(
std::basic_istream<CharT,Traits>
의 public 멤버 함수)
|
|
|
문자 블록을 추출합니다
(
std::basic_istream<CharT,Traits>
의 public 멤버 함수)
|
|
|
문자 블록을 삽입합니다
(
std::basic_ostream<CharT,Traits>
의 public 멤버 함수)
|