I haven't had a chance to try this and my understanding of C is amateur at best. The closest I found to this question was for c++ but dealt with fixed enum values.
Say you have a 2D integer array dynamically allocated like this:
4x4
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
would it be possible to use enum to assign dynamic names to each column and row and then access those rows and columns by their name?
Like:
apples bread carrot dinosaur
apples 0 0 0 0
bread 0 0 0 0
carrot 0 0 0 0
dinosaur 0 0 0 0
Allowing me to do something like this:
matrix[apples][bread] += 1;
EDIT
When I say "dynamic" what I mean is when a value is compiled at run time with no fixed size. So on one run the matrix may be 2x2 or 82x82 and the enum
values could be apple, bear, or apple, bear, teddy etc.