filebuf* open (const char* filename, ios_base::openmode mode);
filebuf* open (const char* filename, ios_base::openmode mode);filebuf* open (const string filename, ios_base::openmode mode);
值 | 代表 | access |
---|---|---|
ios_base::in | 輸入 | 檔案以讀取模式開啟,支援輸入操作。 |
ios_base::out | 輸出 | 檔案以寫入模式開啟,支援輸出操作。 |
ios_base::binary | binary | 操作以二進位制模式執行,而非文字模式。 |
ios_base::ate | 在末尾 | put 指標(pptr)位於受控輸出序列的末尾。 |
ios_base::app | append (追加) | 所有輸出操作都在檔案末尾進行,追加到其現有內容。 |
ios_base::trunc | truncate (截斷) | 檔案開啟前存在的任何內容都將被丟棄。 |
|
)組合。this
。
|
|