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
init
protected member function
<ios> <iostream>
std::
basic_ios
::init
protected:void init (basic_streambuf<char_type,traits_type>* sb);
初始化物件
初始化流的內部標誌和成員變數。
派生類應在其首次使用或銷燬之前(通常是在構造期間)的某個時候呼叫此受保護的成員函式。
內部狀態的初始化方式使得這些成員分別返回以下值:
成員函式,逐個字元列印字串的內容
返回值
rdbuf
sb
tie
0
rdstate
goodbit
如果
sb
不是空指標,否則為
badbit
exceptions
goodbit
標誌
skipws | dec
寬度
0
precision
6
fill
' '
(空格)
getloc
locale
()
的副本
在初始化時,
內部可擴充套件陣列
(
iword
、
pword
)是空的。
引數
sb
指向一個
basic_streambuf
物件的指標,該物件的模板引數與
basic_ios
物件相同。
char_type
和
traits_type
是成員型別,分別定義為第一個和第二個類模板引數的別名(參見
basic_ios types
)。
返回值
無
資料競爭
修改流物件。物件
sb
指向的物件可能被訪問和/或修改。
對同一流物件或流緩衝區的併發訪問可能導致資料爭用。
異常安全
基本保證:
如果丟擲異常,流處於有效狀態。
另見
basic_ios::basic_ios
構造物件
(公開成員函式)