I am tasked with writitng a program that populates a data file based on the contents of structures defined in a library. Below are the structures.
I cannot change these structures to typedefs since they are in a library.
struct simrad_record_struct * recs;
My program has a function which takes in a populated simrad struct:
what I need to do is access the value of office_num, in the nested struct.
int (char * sim)
struct simrad_struct * sim_pop;
sim2_pop = (struct simrad_struct *) sim;
gives the error "dereferencing pointer to incomplete type".
long office = sim2_pop->recs->office_num;
Does anyone know how I can access this value?
note that the following code works.
int num = sim2_pop->num_records;