Code:
fread( &designer, sizeof( DESIGNERRECORD ), 1, fp);
You realize you're only reading one instance here, don't you? Yet here:
Code:
if (strcmp (findname_s, designer[num_of_items_i].forename_s ) == 0)
you're trying to use an array of said items. To simplify issues for you, try not using a pointer first, and just create an instance, read one, test it. See if that works:
Code:
struct myrecord instance;
fread( &instance, sizeof( struct myrecord ), 1, myfile );
if( strcmp( nametofind, instance.name ) == 0 )
You may want to also try printing the contents of the name variable that you've just read out first, to see what it is you're acutally reading. Keep in mind that strcmp is case sensitive.
Quzah.