+ 3
W+ mode is not working why ?
I am using File.open ("filename","w+") but its does not showing anything when i replaced w+ with r its working. can you tell me why?
4 Respuestas
+ 7
Well, you open a file for writing if you want to create it and/or add data to it. And you open a file for reading, if you just want to read the data from it.
You can't do both at the same time to one file (most applications create a virtual copy when working on a file in a more user-friendly way).
+ 7
w+ is for writing, not "showing" (reading). It expects you to write something to the file.
+ 1
so what is reading and writing mode ?
0
file.open("filename",iOS::in|iOS::out)