Quote Originally Posted by Graham Aker
In that case, what should I use in place of strtok? Because Atoi wasn't very helpful, and I need to split that string somehow.
You could use strtok() in combination with atoi(), or you could use sscanf(), or you could write your own integer string parsing code. (Ah, but if this integer is always a single digit, then tabstop's idea applies).

Quote Originally Posted by Graham Aker
Also, DevC++ now tells me that "*emp->digits = (int*)malloc(sizeof(int)*arraysize);" makes an integer from a pointer without a cast. What does that mean?
emp is a pointer to struct integer. emp->digits is a pointer to int. *emp->digits is an integer. What you probably wanted to write was:
Code:
emp->digits = malloc(sizeof(*emp->digits) * arraysize);
The sizeof(*emp->digits) is preferred to sizeof(int) since it means that you will not have to change that in the event that the type of *emp->digits changes.