Syntax: void open(char *filename, int open_mode, int access)
open_mode | Meaning |
---|---|
ios::app | open file for output and seek to the end of the file |
ios::ate | seek to the end of the file after opening it |
ios::in | open file for input (default for ifstreams) |
ios::nocreate | if file does not exist, then fail the open |
ios::noreplace | if file already exists, then fail the open |
ios::out | open file for output (default for ofstreams) |
ios::trunc | if file exists, then truncate its contents. (default for ios::out) |