cplusplus
.com
教程
參考
文章
論壇
C++
教程
參考
文章
論壇
參考
C 庫
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
輸入/輸出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多執行緒
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<ios>
型別
basic_ios
fpos
C++11
io_errc
ios
ios_base
streamoff
streampos
streamsize
wios
wstreampos
操縱符
boolalpha
dec
C++11
defaultfloat
fixed
hex
C++11
hexfloat
internal
left
noboolalpha
noshowbase
noshowpoint
noshowpos
noskipws
nounitbuf
nouppercase
oct
right
scientific
showbase
showpoint
showpos
skipws
unitbuf
uppercase
其他函式
C++11
iostream_category
basic_ios
basic_ios::~basic_ios
basic_ios::basic_ios
公有成員
basic_ios::bad
basic_ios::clear
basic_ios::copyfmt
basic_ios::eof
basic_ios::exceptions
basic_ios::fail
basic_ios::fill
basic_ios::good
basic_ios::imbue
basic_ios::narrow
basic_ios::operator bool
basic_ios::operator!
basic_ios::rdbuf
basic_ios::rdstate
basic_ios::setstate
basic_ios::tie
basic_ios::widen
受保護成員
basic_ios::init
C++11
basic_ios::move
C++11
basic_ios::set_rdbuf
C++11
basic_ios::swap
參考
<ios>
basic_ios
set_rdbuf
受保護的成員函式
<ios> <iostream>
std::
basic_ios
::set_rdbuf
void set_rdbuf (basic_streambuf<char_type,traits_type>* sb);
設定流緩衝區
將
sb
設定為與流關聯的
流緩衝區
,而不改變
控制狀態標誌
(
rdstate
)。
sb
不能是
空指標
。
派生類可以呼叫此函式來更改
流緩衝區
。
引數
sb
指向與
basic_ios
物件具有相同模板引數的
basic_streambuf
物件的指標。
此引數不得為
空指標
。
char_type
和
traits_type
是成員型別,分別定義為第一個和第二個類模板引數的別名(參見
basic_ios types
)。
返回值
無
資料競爭
修改流物件。
併發訪問同一個流物件可能導致資料爭用。
異常安全
基本保證:
如果丟擲異常,流處於有效狀態。
另見
basic_ios::rdbuf
獲取/設定流緩衝區
(公開成員函式)