Se usi ofstream, o fstream con ios:ut, devi specificare anche ios::app, altrimenti il file verrà azzerato. Però così se ci scrivi qualcosa, finisce in fondo al file.
In alternativa usa fstream con gli specificatori: ios::in | ios:ut.
Se usi ofstream, o fstream con ios:ut, devi specificare anche ios::app, altrimenti il file verrà azzerato. Però così se ci scrivi qualcosa, finisce in fondo al file.
In alternativa usa fstream con gli specificatori: ios::in | ios:ut.
This code and information is provided "as is" without warranty of any kind, either expressed
or implied, including but not limited to the implied warranties of merchantability and/or
fitness for a particular purpose.