<fstream>

std::wifstream

typedef basic_ifstream<wchar_t> wifstream;
Input file stream (wide)

Input stream class to operate on files using wide characters.

This is an instantiation of basic_ifstream with the following template parameters
模板引數定義註釋
charTwchar_t別名為成員 char_type
特性 (traits)char_traits<wchar_t>別名為成員 traits_type

Apart from the internal file buffer of type wfilebuf, objects of this class keep a set of internal fields inherited from ios_base, wios and wistream

欄位成員函式描述
格式化格式標誌標誌
setf
unsetf
一組影響某些輸入/輸出操作如何被解釋或生成的內部標誌。
參見成員型別 fmtflags
欄位寬度寬度要插入的下一個格式化元素的寬度。
顯示精度precision下一個插入的浮點值的小數精度。
localegetloc
imbue
函式用於受本地化屬性影響的格式化輸入/輸出操作的 locale 物件。
填充字元fill用於將格式化欄位填充到欄位寬度width)的字元。
狀態錯誤狀態rdstate
setstate
clear
流的當前錯誤狀態。
可以透過呼叫 goodeoffailbad 來獲取單個值。
參見成員型別 iostate
異常掩碼exceptions會為其丟擲 failure 異常的狀態標誌。
參見成員型別 iostate
其他回撥棧register_callback指向在某些事件發生時被呼叫的函式的指標棧。
可擴充套件陣列iword
pword
xalloc
用於儲存 longvoid* 型別物件的內部陣列。
繫結流tie指向輸出流的指標,該流在此流的每次 I/O 操作前被重新整理。
流緩衝區rdbuf指向關聯的 basic_streambuf 物件的指標,該物件負責所有輸入/輸出操作。
字元計數gcount上次未格式化輸入操作讀取的字元數(僅限輸入流)。

成員型別

該類聲明瞭以下成員型別
成員型別定義
char_typewchar_t
traits_typechar_traits<wchar_t>
int_typewint_t
pos_typewstreampos
off_typestreamoff
And these member types inherited from ios_base and wistream

公開成員函式

Note: This section links to the references for members of its basic template (basic_ifstream).


Public member functions inherited from wistream


wios 繼承的公共成員函式


ios_base 繼承的公開成員函式


非成員函式過載