I have a large structure in one file. Other functions in other files want to know the depth of the structure.
In the file with the structure, the depth is
#define Size = sizeof(mystruct)/sizeof(mystruct)
Size is only visible in this one file.
I had no way of making Size visible to all files, so I just hard coded the result of Size in a .h file that was included in all files. This finally burned me as I failed to update the value when the table grew.
How can I make the number of entries in the structure visible to all files?