Hello, My project contains several files: main.c routines.c config.h etc. In the main.c I make a structure like:
xdata struct StructUserRec{ BYTE XPIDNr[9]; char UserName[15]; BYTE ContrHour; BYTE ContrMin; BYTE WorkedHour; BYTE WorkedMin; }; xdata struct StructUserRec UserRec[10];
extern struct StructUserRec UserRec[10];
"But what about data hiding?. Putting the definition into the header file uncovers the real implementation..." No, it doesn't. IF you've put something in a header file, then you're not hiding it, are you? You put stuff into a header file because you want to share it - not hide it! If you're going to share something, you obviously need to share both its name and its type - otherwise the "sharees" won't know what to do with it, will they?!