There is a set of constants representing offsets in some file. These offsets are fixed. And they range from 0 to 0x1FFFFFF. How to present them in the most convenient way in the source code? The code will be with classes. And, accordingly, the namespace also does not want to clutter up.
Options to choose from:
- Macros using
define
. Bad that no words. const
in the right quantity. It is possible inside some separatenamespace
- well, but it seems rather dreary to type them in the right amount.enum
. The problem here is that the constants will not go in a row. And again, it turns out not very convenient.
Of course, you can still make a structure with alignment = 1 and stuff the necessary number of variables and arrays inside it. But this is not the PLO at all. And what will happen if the file format changes (a tail is added)? Ugly shorter.
What did I forget or miss?