Structures and file io
ok, i am trying to figure out how to use structs with file i/o. i am not quite sure if i am going in the right direction. i am writing a program that records any user defined files, their modify time, access time, and size. i decided to use a struct like:
typedef struct FRec //Do i even need typedef?
i can already get the info into the struct but i am having trouble writing it to a file. also reading from a file. my file format consists of:
could someone help a downed C programmer?
Same sort of idea if you're using binary files and fwrite - you have to write what each pointer points to, not the pointer itself.
fprintf( fp, "%s\n", Rec1.iofilename );