C++ Macro - pass string and use as a variable name
-1 So i'm working on a small hobby project which i have implemented a very basic reflection of enums. I have come across an issue which i'm struggling to find a solution. This would be an ideal call which i'm looking for Reflect_Value("TestStringName", "StringValue") the first parameter is a string which is intended to be appended onto a variable name and the second to be the actual string value #define Reflect_Value(name,t) namespace Reflection static ReflectedObject object_##name = ReflectedObject(name,t); now the macro would then take that first parameter and be used as object_TestStringName but when i pass the string in the code evaluates to object_"TestStringName" which doesn't compile. What am i doing wrong here or can anyone provide any solutions to how i could get this functionality please. its important to have the name be something i guess recognisable and also unique so i can reflect many objects Thanks c++ mac...