how to get a variable type in c++ code example Example: c++ how to check type of variable typeid(variable).name()