but i have problems on writing the linked list on the binary file...
Originally Posted by quzah
is this correct?
assuming that head is the head pointer of the linked list..
fwrite(&pokemon, sizeof(pokemon_t), 1, bfp);
and i read it using this code...
is the code in writing the linked list into the file wrong?
fseek(bfp, sizeof(pokemon_t)*i, SEEK_SET);
fread(&pokemon, sizeof (pokemon_t), 1, bfp);
printf("Name is %s\n", pokemon.name);
printf("Type is %s\n", pokemon.type);
or is it the code in reading??
pls explain to me