1std::string str = "text"; // stores a string
2int foo = 3; // stores any integer
3float bar = 3.14; // stores 32 bit number
4double baz = 3.14159265; // stores 64 bit number
1// Example
2std::cout << "Data-type = " << typeid(YourVariable).name() << "\n";
3
4// Syntax
5typeid(YourVariable).name()