Code:void writefunc(void){ extern CFile cfile; typedef struct mything{ char abuf[100]; char pbuf[100]; } t, *a; a=&t; // assuming you now have data in t cfile.Write(a->abuf, sizeof(struct mything) ); cfile.Close; // write to the file & close it. cfile.Open; // read data from the file into a struct. cfile.Read(a,sizeof(struct mything) ); cfile.CLose; }




Reply With Quote