Hello all,
I am looking to keep a file with the running log the highest serial number issues, and therefore i know the next one to issue.
I have loaded the file by:
it seems to load the file ok, but now i would like to read the data out of the file (it will be an int number)Code:FILE *fp; if ((fp = fopen("programdata", "r")) ==NULL){ printf("Error Data opening file\n"); system("pause"); } else { printf("Data file opened successfully\n"); system("pause"); }
i have tried:
this will give me avalible data (currently a value of "4") but how do i put it into a global variable so i can access it?Code:int fgetc(FILE *fp); //load in highest saved serial number int fclose(FILE *fp); printf("Data Loaded\n"); system("pause");
Thanks...
Steve