Ciao a tutti,![]()
![]()
Ho un problema..come faccio ad aprire un file di testo in modalità LETTURA\SCRITTURA senza doverlo aprire,chiudere e riaprire, insomma aprirlo solo una sola volta?
Ciao a tutti,![]()
![]()
Ho un problema..come faccio ad aprire un file di testo in modalità LETTURA\SCRITTURA senza doverlo aprire,chiudere e riaprire, insomma aprirlo solo una sola volta?
Dall'help della fopen ...
"r+"
Opens for both reading and writing. (The file must exist.)
"w+"
Opens an empty file for both reading and writing. If the given file exists, its contents are destroyed.
"a+"
Opens for reading and appending; the appending operation includes the removal of the EOF marker before new data is written to the file and the EOF marker is restored after writing is complete; creates the file first if it doesn't exist.