i am doing a program where i have to create a file, witch i have to ask where to save, the name, and the extension, and then it have to be writing wat i want for the all program, but at the end i have a question about want to leave the program or not, if this anwer is to get out of the program i want him to get out of the program and save the file, but if the answer is to continue in the program i want him to continue writing withou deleting anything...
i looked in this website: http://www.mattjustice.com/cnotes/c_fileio.html
but the program allways delete the contents of the file
this is the part thtat creates the file in my program:
i allready saw wat was wrong... in the website that i got it didnt meantion the "a+" and that is the solution... tks.
now how can i ask to the user to tell where to create the file and how to call it? because i cant put something like: f=fopen("%c:\\euromilhoes.txt", driver,"a+");
isnt there another way to do it? because i dont understand nothing about strings and i when i insert your program into mine it just give me errors
and i really dont understand all of that cout and cins... never used that, and in my all program i am using printf and scanf, is it possible to substitute?
> i dont understand nothing about strings ...
> and i really dont understand all of that cout and cins ...
It is perfectly fine that you do not understand something at this moment; folks here would be very willing to help you understand. But you have to make an effort to try and understand C++.