Addressen speichern, sodass sie nach einem Neustart des Programms gespeichert bleiben

Sored

Grünschnabel
Ich hab ein großes Problem:
Ich hab ein Addressbuch programmiert und weiß jetzt nicht wie ich die Addressen speicher so das die nach einem Neustart des Programms Gespeichert bleiben.....?
Bitte helft mir
 
Header: <stdio.h>
Funktionen: fopen, fclose, fread, fwrite, fprintf, fflush, fputc, fgetc, fscanf, fgets, fputs
 
C++:
#include <stdio.h> // FILE, fopen, fputs, fclose
#include <stdlib.h> // EXIT_SUCCESS, EXIT_FAILURE

int main()
{
    // try to open file "test.txt" for (w)riting
    FILE ptr_file = fopen("test.txt", "w");
    if (ptr_file == NULL) return EXIT_FAILURE;

    // write string into file
    fputs("Das ist ein String!", ptr_file);

    // close file
    fclose(ptr_file);
    return EXIT_SUCCESS;
}
;)
 
Zuletzt bearbeitet:
Zurück