-5

I'm looking for a function that returns a variable name

Theoretical example

template <typename Type>
std::string GetVarName(Type Var)
{
    //Get Name 
    return Variable_name;
}
Gildin
  • 1

1 Answers1

0

You could try to stringify the variable using the preprocessor. In the posted link by Schultke there are some examples using macro in order to achieve that.

ubkxv
  • 1