Hey I need help to define variable when numbers are in a text file.
What I need to do is:
Open a text file that there is only one line, its write: 1000,0.15,5
I need to read the line and define the variable:
1000 as 'float money'
0.15 as 'float interest'
5 as 'int month'
There is my code so far
Thanks to anyone who helpCode:float money; float interest; int Month; FILE *fEntree; fEntree = fopen("infobase.DON","rt"); if (fEntree == NULL) printf("Error"); /* need the code there */ fclose(fEntree);