get data type in c++ code example
Example 1: cpp get data type
#include <typeinfo>
...
cout << typeid(variable).name() << endl;
Example 2: Data Types in C++
Data types in c++
Built-in User Defined Derived
---------- ----------- ------------
void, int, structure, array,
char, float, union, function,
double, bool, enum, pointer,
long long class, reference
Wide Character typedef