How to call a function several times, but with a different structure as argument?
I have written a function where I can save a structure in a file. So the prototype looks like this:
The structure looks for example like this:
void SaveStructure(FILE *f, STRUCTURE *structure);
Now I want to use the function SaveStructure(...) again, but with this structure for example:
} STRUCTURE ;
How can I make it possible that the function SaveStructure(...) doesn't care how the structure looks like?
} NEW_STRUCTURE ;
Does the format of the pointer struct always looks the same? So could I make a dummy-structure:
and use the function:
void SaveStructure(FILE *f, SAVESTRUCT *structure);
thx for any help....
void main (void)
FILE *f1 = NULL;
FILE *f2 = NULL;