Creating a numbered list, divided into types, without need for shifting or re-ordering - is this a re-occuring problem My question is not for a solution to the problem, though I do need to put thought into it but rather my question is if this conceptual problem has a name or has been addressed at already in computer science.

I want to create a list of numbered defines, each uniquely mapped, and divided into groups based on type. The goal is a design that does not require renumbering or shifting when reaching the end of the previously allotted space for a certain type. An example may help

    // Dogs (1 to 3 available)
    define DOG_1            1
    ....
    define DOG_3            3

    // Cats (4 to 6 available)
    define CAT_4            4
    ....
    define CAT_6            6

    // Pigs (7 to 10 available)
    define PIG_7            7
    ...
    define PIG_10           10


Now if I want to add space for more dogs it requires shifting etc.

This problem seems similar to something found in memory allocation/fragmentation. I want to find literature that addresses the problem if it exists.

Thanks,
Godrick
You might be  looking for an enum.  See https://en.wikipedia.org/wiki/Enumerated_type.