I want to define a list of constants that have continuous integer value, for example:
var config.type = {"RED": 0, "BLUE" : 1, "YELLO" : 2};
But it's boring to add a "XX" : y every time I need to add a new element in it.
So I'm wondering is there something like enumerator in C so I can just write:
var config.type = {"RED", "BLUE", "YELLO"} and they are given unique integer value automatically.