freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c畢業(yè)論文外文翻譯(完整版)

2025-07-11 19:20上一頁面

下一頁面
  

【正文】 的故障,如無法恢復(fù)的讀寫錯誤。 clear 操作將條件重設(shè)為有效狀態(tài)。按位或操作使用其操作數(shù)的二進制位模式產(chǎn)生一個整型數(shù)值。 條件狀態(tài)的訪問 rdstate 成員函數(shù)返回一個 iostate 類型值,該值對應(yīng)于流當(dāng)前的整個條件狀態(tài) 。 流的狀態(tài)由 bad、 fail、 eof 和 good 操作提示。這個狀態(tài)成員為 iostate 類型,這是由各個 iostream 類分別定義的機器相關(guān)的整型。 流必須處于無錯誤狀 態(tài),才能用于輸入或輸出。謹(jǐn)記本節(jié)和下一節(jié)所介紹的內(nèi)容同樣適用于普通流、文件流以及 string 流。 這個要求有兩層特別重要的含義。相應(yīng)的文件輸入輸出類是 wifstream、 wofstream 和 wfstream。 進行操作的函數(shù),也可使用 ifstream 或者 istringstream 對象來調(diào)用。盡管我們的程序還沒用過這種類型,但事實上可以多了解一些關(guān)于 iostream 的用法。 表 列出了 C++ 的 IO 類,而 圖 則闡明這些類型之間的繼承關(guān)系。 乍看起來,要同時支持或使用不同類型設(shè)備以及不同大小的字符流,其復(fù)雜程度似乎相當(dāng)可怕。相對而言,本書把重點放在 IO 標(biāo)準(zhǔn)庫對普通程序最有用的部分。 cerr 常用于程序錯誤信息。此外,一般來說,類的 設(shè)計者還可以很方便地使用 IO 標(biāo)準(zhǔn)庫設(shè)施讀寫自定義類的對象。 can be called with an ofstream or ostring stream object. Because the IO types are related by inheritance, we can write one function and apply it to all three kinds of streams: console, disk files, or string streams. International Character Support The stream classes described thus far read and write streams posed of type char. The library defines a corresponding set of types supporting the wchar_t type. Each class is distinguished from its char counterpart by a w prefix. Thus, the types wostream, wistream, and wiostream read and write wchar_t data to or from a console window. The file input and output classes are wifstream, wofstream, and wfstream. The wchar_t versions of string stream input and output are wistring stream, wostring stream, and wstring stream. The library also defines objects to read and write wide characters from the standard input and standard output. These objects are distinguished from the char counterparts by a w prefix: The wchar_t standard input object is named wcin。 2020 年畢業(yè)設(shè)計論文英漢互譯部分 Chapter 8. The IO Library In C++, input/output is provided through the library. The library defines a family of types that support IO to and from devices such as files and console windows. Additional types allow strings to act like files, which gives us a way to convert data to and from character forms without also doing IO. Each of these IO types defines how to read and write values of the builtin data types. In addition, class designers generally use the library IO facilities to read and write objects of the classes that they define. Class types are usually read and written using the same operators and conventions that the IO library defines for the builtin types. This chapter introduces the fundamentals of the IO library. Later chapters will cover additional capabilities: Chapter 14 will look at how we can write our own input and output operators。 standard output is wcout。類類型通常使用 IO 標(biāo)準(zhǔn)庫為內(nèi)置類型定義的操作符和規(guī)則來進行讀寫。 ? 操作符,用于從 istream 對象中讀入 輸入。 . 面向?qū)ο蟮臉?biāo)準(zhǔn)庫 迄今為止,我們已經(jīng)使用 IO 類型和對象讀寫數(shù)據(jù)流,它們常用于與用戶控制窗口的交互。為了管理這樣的復(fù)雜性,標(biāo)準(zhǔn)庫使用了 繼承( inheritance)來定義一組 面向?qū)ο螅?objectoriented) 類。繼承關(guān)系通??梢杂妙愃朴诩彝涞膱D解說明。 iostream 類型由 istream 和 ostream 兩者派生而來。類似地,形參為 ostreamamp。而 wchar_t 版本的 string 輸入/輸出流則是 wistringstream、 wostringstream 和 wstringstream。正如在 第九章 看到的,只有支持復(fù)制的元素類型可以存儲在 vector 或其他容器類型里。 實現(xiàn) IO 的繼承正是錯誤發(fā)生的根源。檢測流是否用的最簡單的方法是檢查其真值 。該狀態(tài) 成員以二進制位( bit)的形式使用,類似于 第 節(jié)的例子中用于記錄測驗成績的 int_quiz1 變量。如果 bad、 fail 或者 eof 中的任意一個為 true,則檢查流本身將顯示該流處于錯誤狀態(tài)。 多種狀態(tài)的處理 常常會出現(xiàn)需要設(shè)置或清除多個狀態(tài)二進制位的情況。另外一種方法則是使用按位或( OR)操作符( 第 節(jié) )在一次調(diào)用中生成 “ 傳遞兩個或更多狀態(tài)位 ” 的值。 clear 和 setstate 操作用于改變條件成員的狀態(tài)。這些常量值用于指出特定類型的 IO 條件,可與位操作符 ( 第 節(jié) )一起使用,以便在一次操作中檢查或設(shè)置多個標(biāo)志。如果成功輸入,則條件檢測為 true。 IO 標(biāo)準(zhǔn)庫管理一系列 條件狀態(tài)( condition state) 成員,用來標(biāo)記給定的 IO 對象是否處于可用狀態(tài),或者碰到了哪種特定的錯誤。 第二個含義是:形參或返回類型也不能為流類型。這些對象加上 “ w” 前綴,以此與 char 類型版本區(qū)分: wchar_t 類型的標(biāo)準(zhǔn)輸入對象是 wcin;標(biāo)準(zhǔn)輸出是 wcout;而標(biāo)準(zhǔn)錯誤則是 wcerr。因為 IO 類型通過繼承關(guān)聯(lián),所以可以只編寫一個函數(shù),而將它應(yīng)用到三種類型的流上:控制臺、磁盤文件或者 字符串流( string streams) 。也就是說,可使用 iostream 類型在同一個流上實現(xiàn)輸入和輸出操作。因此, 圖 所示, istream 是 ifstream 和 istringstre
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1