Jump to content

Question about w+ and a+


eldan88

Recommended Posts

From the manual:

 

'w+' Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.

 

'a+' Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

 

'r+' Open for reading and writing; place the file pointer at the beginning of the file.

 

each mode has different settings that control where the pointer is to be placed, whether or not to truncate data etc..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.