The library defines the following open modes and file attributes:
ios::app // append
ios::ate // open and seek to file's end
ios::binary // binary mode I/O (as opposed to text mode)
ios::in // open for read
ios::out // open for write
ios::trunc // truncate file to 0 length
You may combine several flags by using the bitwise OR operator: