Hi

I have a bunch of defines with values from 1-100.

I want to provide some sort of function that takes in a range and returns a list or map (like a python dictionary) of items that fall under that range

eg.

#define BOB_AGE 10 // this is how existing defines are and I cant change them.
#define BILL_AGE 13
#define TIM_AGE 22
#define TOM_AGE 30

getPeopleBetween(5,20);

I would want a python like dictionary that is returned, where I can have map like functionality and request the value (age) from this returned list.


At the moment, I have a master map list where I add all defines within the constructor. I was thinking of creating another list and returning that within the get function. However, would I not have scope problems?

Just thinking what would be a good solution.

Hope this makes sense.

Thanks all.