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>
<iostream>
物件
、cerr
cin
、clog
、cout
、wcerr
wcin
、wclog
、wcout
參考
<iostream>
、wcout
物件
<iostream>
std::
wcout
extern basic_ostream<wchar_t> wcout;
寬字元標準輸出流
類
wostream
的物件,表示面向寬字元(
wchar_t
型別)的
標準輸出流
。它對應於
C流
stdout
。
標準輸出流
是環境確定的字元的預設目標。此目標可能與其他標準物件(如
wcerr
或
wclog
)共享。
作為
basic_ostream
類的一個物件,可以透過插入運算子(
operator<<
)以格式化資料的方式,或使用
write
等成員函式以未格式化資料的方式向其寫入字元。
該物件在標頭檔案
<iostream>
中宣告,具有
外部連結
和
靜態儲存期
:它在程式的整個生命週期內都存在。
在
靜態初始化順序
方面,可以保證
wcout
在
ios_base::Init
型別物件被構造的第一次之前被正確構造和初始化。
在
靜態初始化順序
方面,可以保證
wcout
在包含
<iostream>
至少一次對具有
靜態持續時間
的此類物件進行初始化後,在
ios_base::Init
型別物件被構造的第一次之前被正確構造和初始化。
wcout
沒有
繫結
到任何其他輸出流(參見
basic_ios::tie
)。
預設情況下,
wcout
與
stdout
同步(參見
ios_base::sync_with_stdio
)。
程式不應混合對
wcout
的輸出操作與對
cout
(或對
stdout
的其他窄定向輸出操作)的輸出操作:一旦對其中任何一個執行了輸出操作,
標準輸出流
就會獲得一個定向(窄或寬),該定向只能透過對
stdout
呼叫
freopen
來安全地更改。
有關
wcout
支援的操作的更多資訊,請參見其型別的參考:
basic_ostream
。
另見
ostream
輸出流
(類)
、cout
標準輸出流
(物件)
wcin
標準輸入流 (寬)
(物件)
、wcerr
標準錯誤輸出流 (寬字元)
(物件)
、wclog
標準日誌輸出流 (寬)
(物件)