Hi,
I need a program in C that is capable of writing the multiple records into a file.And another function that should read the same data from the from the file and store it in the approptiate data structure.
for eg:
Code:typedef struct res { int res_type; char *res_name; char *res_loc; int priority; }res int store(int g_id,char *gname,struct res) { all these parameters should be stored in a file and return 1 if the storing is success and 0 if the storing is failed while storing if there is a repetition of g_id a error should be displayed.g id should be unique for each record } ----------------------------------------------------------------------------------------------------------------------------------------- inside the file, informations should be stored like this ------------------------------------------------------------------------------------------------------------------------------------------- g id :100 g name:xyz res type:s/w res loc:c:/windows/pgm/a.txt res name:asd g id :210 g name:yzs res type:s/w res loc:c:/windows/pgm/a.txt res name:acd g id :101 g name:xss res type:s/w res loc:c:/windows/pgm/a.txt res name:aza ------------------------------------------------------------------------------------------------------------------------------------------ struct read() { read should be capable of retrieving each record(i.e, g id,gname ,res type,res loc,res name) and store it in a structure and should return the structure to the calling function }
plz help me to get the code
thank u for ur help in advance
}
}



LinkBack URL
About LinkBacks


