void saveData(FILE *profile, int *data) {
int i;
for (i = 0; i < 11; ++i) {
fputs(*(data + i) + '0',profile);
fputs("\n", profile);
}
}
Also this warning: passing arg 1 of `fputs' makes pointer from integer without a cast : on the line that says fputs(*(data + i) + '0',profile);
Arguments passed to this function are the file pointer of profile set to "w", and the pointer to the beginning of an array of integers going up to 10 (11 Elements total starting from 0)
Running the program results in a crash when the code reaches this point.
Hopefully, this will be clearer than my other posts

New Topic/Question
Reply




MultiQuote







|