ios::app The function performs a seek to the end of file. When new bytes are written to the file, they are always appended to the end, even if the position is moved with the ostream::seekp function.
当以 ios::app 打开文件时,seekp 函数不起作用
ios::out|ios::int 打开文件 可以读写 可以用来打开已有的文件,然后再写文件
ios::ate 打开会清除原有信息