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>
<fstream>
類模板
basic_filebuf
basic_fstream
basic_ifstream
basic_ofstream
類
filebuf
fstream
ifstream
、ofstream
wfilebuf
wfstream
wifstream
、wofstream
參考
<fstream>
wfilebuf
類
<fstream>
std::
wfilebuf
typedef basic_filebuf<wchar_t> wfilebuf;
檔案流緩衝區 (寬字元)
wstreambuf
wfilebuf
用於讀寫寬字元檔案的流緩衝區。
這是
basic_filebuf
的一個例項化,使用了以下模板引數:
模板引數
定義
註釋
charT
wchar_t
別名為成員
char_type
特性 (traits)
char_traits
<wchar_t>
別名為成員
traits_type
成員型別
成員型別
定義
char_type
wchar_t
traits_type
char_traits
<wchar_t>
int_type
wint_t
pos_type
wstreampos
off_type
streamoff
公開成員函式
注意:本節連結到其基本模板 (
basic_filebuf
) 成員的參考。
(建構函式)
構造物件
(公開成員函式)
(解構函式)
析構物件
(公共成員函式)
operator=
移動賦值
(公開成員函式)
swap
交換檔案緩衝區
(公開成員函式)
檔案關聯
open
開啟檔案
(公開成員函式)
is_open
檢查檔案是否開啟
(公開成員函式)
close
關閉檔案
(公開成員函式)
繼承自
wstreambuf
的公開成員函式
區域設定
:
pubimbue
注入 locale
(公開成員函式)
getloc
獲取當前 locale
(公開成員函式)
緩衝區管理和定位
:
pubsetbuf
設定緩衝區陣列
(公開成員函式)
pubseekoff
將內部位置指標設定為相對位置
(公開成員函式)
pubseekpos
將內部位置指標設定為絕對位置
(公開成員函式)
pubsync
同步流緩衝區
(公開成員函式)
輸入函式 (get)
:
in_avail
獲取可讀的字元數
(公開成員函式)
snextc
前進到下一位置並獲取字元
(公開成員函式)
sbumpc
獲取當前字元並前進到下一位置
(公開成員函式)
sgetc
獲取當前字元
(公開成員函式)
sgetn
獲取字元序列
(公開成員函式)
sputbackc
放回字元
(公共成員函式)
sungetc
回退當前位置
(公開成員函式)
輸出函式 (put)
:
sputc
放置字元並前進到下一位置
(公開成員函式)
sputn
放置字元序列
(公開成員函式)
受保護的虛擬函式重寫
showmanyc
獲取可用字元數
(公開成員函式)
underflow
在下溢時獲取字元
(受保護的虛成員函式)
uflow
在上溢時獲取字元並前進位置
(受保護的虛成員函式)
pbackfail
在下溢時放回字元
(受保護的虛成員函式)
overflow
在上溢時放置字元
(受保護的虛成員函式)
setbuf
設定緩衝區
(受保護的虛成員函式)
seekoff
將內部位置設定為相對位置
(受保護的虛成員函式)
seekpos
將位置指標設定為絕對位置
(受保護的虛成員函式)
sync
同步緩衝區
(受保護的虛成員函式)
imbue
設定 locale
(受保護的虛成員函式)
該類還繼承了其他非虛或未被重寫的受保護成員。更多詳情請參見基類
wstreambuf
。
非成員函式過載
swap
交換檔案緩衝區
(函式模板)