I want to put a function into my program that outputs to the console the type of any given variable. The problem is that the outputted names of some - or all - types is implementation-defined, making typeid().name useless. Thus, I need to first check to see if the variable is of a given type. If the variable is an integer, for example, the program should print "integer".
If that isn't what you're looking for, the only other thing I can think of is to use std::type_index and std::unordered_map to create your own lookup table of type names. See http://www.cplusplus.com/reference/typeindex/type_index/ for an example.