I need to separate a long string into smaller peaces with a strtok() and those peaces need to be values of members of a struct. What should I do to achieve that? Inside the while should I put ifs without the else or should I use another method? I will give you the struct so you can help yourselves.
Code:typedef struct { int year; int month; int day; }date; typedef struct { double latitude; double longitude; }location; typedef struct incList { /*Gia string ""*/ char area[100]; date reported; int total_missing; int dead_women; int dead_men; int dead_kids; char cause_of_death[150]; char location_description[500]; location coordinates; char URL[100]; struct incList *next; }incident;