Code:
int i, *tension;
tension = (int *) calloc(MAX_READINGS, sizeof(int));
if (fscanf(readings,"%s %d\n", reading_times[0], tension[0]) == EOF)
Last edited by a moderator:
int i, *tension;
tension = (int *) calloc(MAX_READINGS, sizeof(int));
if (fscanf(readings,"%s %d\n", reading_times[0], tension[0]) == EOF)
thanks guys.
I found the error while writing the post but couldn't find out how to delete it. I left out the & in front of tension[0].