There is no table of names generated by the compiler (if you do not calculate debugging information), but if you create one (or use, for example, doxygen , which analyzes the source code and can output such lists in XML format ), then you can use a dictionary of some sort either type, for example std::map<string, int>, to turn an identifier into a numerical value.
source
share