C++ 庫 - <iostream>



描述

它用於標準輸入/輸出流庫。

宣告

以下是 iosstream 函式的宣告。

C++98

Including this header may automatically include other headers, such as <ios>,
   <streambuf>, <istream>, <ostream> and/or <iosfwd>.

C++11

Including <iostream> automatically includes also <ios>, <streambuf>, <istream>,
   <ostream> and <iosfwd>.

物件

iosstream 的物件應如下所示:

窄字元 (char)

序號 字元 定義
1 cin 標準輸入流
2 cout 標準輸出流
3 cerr 標準錯誤輸出流
4 clog 標準日誌輸出流

寬字元 (wchar_t)

序號 字元 定義
1 wcin 標準輸入流(寬)
2 wcout 標準輸出流(寬)
3 wcerr 標準錯誤輸出流(寬字元)
4 wclog 標準日誌輸出流(寬)
廣告