Access variable value using string representing variable’s name in C++ [duplicate]

As has been mentioned, you are looking for reflection in C++. It doesn’t have that, and this answer explains why.

Leave a Comment