how to print datatype in c++ code example
Example 1: print data type of a variable in c++
int x = 5;
typeid(x).name();
//output: i
// i stands for int
Example 2: how to print string data type in c++
printf("%s\n",someString.c_str());
int x = 5;
typeid(x).name();
//output: i
// i stands for int
printf("%s\n",someString.c_str());