Command: fopen & freopen
Syntax:
const char * mode
Values: · r - open text file for reading.
· w - create text file for writing, or truncate to zero length
· a - append; open text file or create for writing at eof
· rb - open binary file for reading
· wb - create binary file for writing, or truncate to zero length
· ab - append; open binary file or create for writing at eof
· r+ - open text file for update (reading and writing)
· w+ - create text file for update, or truncate to zero length
· a+ - append; open text file or create for update, writing at eof
· r+b/rb+ - open binary file for update (reading and writing)
· w+b/wb+ - create binary file for update, or truncate to zero length
· a+b/ab+ - append; open binary file or create for update, writing at eof
|
|
|