From file to structure in C
问题 I am trying to write from file to structure in C. Whenever I try to assign value in structure it gives me error: incompatible types in assignment. My structure looks like this: struct competition{ char eventTitle[79]; char date[79]; char time[79]; }; Basically I want to open the file and assign individual line to different value in structure. ie. first line in file -> eventTitle, second line -> date, third line -> time. Here is how I try to assign it: FILE *naDaSt; char *mode = "r"; int lines