I have the following input:
AG23,VU,Blablublablu,8
IE22,VU,FooBlaFooBlaFoo,3
and so on...
I want it to "parse" with scanf()
using some code like this:
char sem[5];
char type[5];
char title[80];
int value;
while(scanf("%s,%s,%s,%d", sem, type, title, &value) == 4) {
//do something with the read line values
}
But the execution of the code gives me: illegal instruction
How would you read a comma-separated file like this?