Overwriting the txt file in C

4

My question is pretty basic:

How do I, whenever I save something to a file (txt), always start recording after the information that was already written there?

I mean, how do I not overwrite the contents of a file that already had information entered?

Language C in this case

    
asked by anonymous 03.07.2017 / 01:05

1 answer

6

Just open the file with fopen in append mode :

FILE *file = fopen("meuarquivo.txt", "a");
    
03.07.2017 / 02:51