Is there a way to find the maximum and minimum defined values of an enum in c++?
No. An enum in C or C++ is simply a list of constants. There is no higher structure that would hold such information.
Usually when I need this kind of information I include in the enum a max and min value something like this:
enum {
eAaa = 1,
eBbb,
eCccc,
eMin = eAaaa,
eMax = eCccc
}
See this web page for some examples of how this can be useful: Stupid Enum Tricks