Code:I am having a bit of trouble doing a C Program using fscanf any help would be great i'm using a structure typedef struct { char color[20]; char size [1]; int qty [5]; double price[20]; }PAINTDATA; and i am supposed to fscanf in data like red q 16 25.99 from a data file but i am currently stumped on how to make a workable loop and function for the program would i need a function such as void getData (PAINTDATA ); and how would i set up a good loop to input the date fscanf(infile, "%s %s %d %lf", ??? as to what to put here) I'm assuming a need a loop but am unsure how to do it again any help would be great thanks!!!



LinkBack URL
About LinkBacks



