I'm trying to scanf multiple ints from a string, but I don't know how many it will have, because it varies from case to case. I want to scanf multiple numbers and put them in an array.
I've been trying to do it this way but it's not working... Assuming I want to scan C numbers from the string "line".
for(a=0;a<c;a++)
sscanf(line, " %d ",&v[a]);
<space>Number<space>from the beginning of the line. So for example if you line is ` 1 2 3 4, you will always read1`.