r+: Open for reading and writing. The stream is positioned at the beginning of the file.
w+:Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.
r+具有读写属性,从文件头开始写,保留原文件中没有被覆盖的内容;
w+具有读写属性,写的时候如果文件存在,会被清空,从头开始写。