C++ examples for Data Type:auto
Using auto with a class type
#include <iostream> #include <typeinfo> using namespace std; class MyClass//from w w w . j a va2 s. c om { }; int main() { auto variable = MyClass(); cout << "Type of variable: " << typeid(variable).name() << endl; return 0; }