basic_filebuf* open (const char* filename, ios_base::openmode mode);
basic_filebuf* open (const char* filename, ios_base::openmode mode);basic_filebuf* open (const string filename, ios_base::openmode mode);
值 | 代表 | access |
---|---|---|
ios_base::in | 輸入 | File open for reading, supporting input operations. |
ios_base::out | 輸出 | File open for writing, supporting output operations. |
ios_base::binary | binary | 操作以二進位制模式執行,而非文字模式。 |
ios_base::ate | 在末尾 | The put pointer (pptr) starts at the end of the controlled output sequence. |
ios_base::app | append (追加) | 所有輸出操作都在檔案末尾進行,追加到其現有內容。 |
ios_base::trunc | truncate (截斷) | 檔案開啟前存在的任何內容都將被丟棄。 |
|
)組合。this
if successful.
|
|