print type cpp

C++
typeid(variable).name()
Source

Also in C++: