Well, there is a problem on line 103, where you intend to read the data in:
Code:
token = strtok(NULL, " ");
process.quantum[i] = (int)token;
The 2nd line implies that the data was serialized in the file -- in other words, written as an int, not a string representation of a number. Eg, if you wrote the data like this "someword 1234", 1234 is not an int, it is a string.
In any case, strtok does not place the data into an int, it places it into a string. You cannot have actual int data in a string, because an int can contain a zero byte '\0' which terminates the string. It would be impossible to use strtok here anyway, since it reads to some terminating character, which there are no single byte values which are not a part of a legal int. What you could use is something like:
Code:
fread(myint, sizeof(int), 1, fp);
But I am guessing the numbers are just written into the file as text, right? In that case, you want to use strtol() to place the number into process.quantum. You can't simply cast a string as int to convert the value.
I think maybe you need to explain more specifically the problems you are having, since clearly this was a problem, rather than saying "I am having trouble trying to figure out how to do this" and not mentioning what has gone wrong.