fread help

mitchemt at silver.ucs.indiana.edu mitchemt at silver.ucs.indiana.edu
Sat Feb 17 14:17:00 AEST 1990


    I am trying to get fread to work with a structure I have defined. It seems
that turbo c won't read correctly. The structure is defines as follows:
struct e {
	  char indicator;
	  char *description;
	  char *path;
	 };
typedef struct e ENTRY;

When I try to fread, I get the correct value for 'indicator', but junk for the
other two. Is my code wrong or is the file wrong. If it is the file could 
someone please send me and example of one that would work with the code I
have written. 
 				Terrence Mitchem
ps: any help is GREATLY appreciated.

     



More information about the Comp.lang.c mailing list