I have seen code which use vector,
vectors;
s.push_back(11);
s.push_back(22);
s.push_back(33);
s.push_back(55);
for (vector::iterator i
The auto keyword gets the type from the expression on the right of =. Therefore it will work with any type, the only requirement is to initialize the auto variable when declaring it so that the compiler can deduce the type.
Examples:
auto a = 0.0f; // a is float
auto b = std::vector(); // b is std::vector()
MyType foo() { return MyType(); }
auto c = foo(); // c is MyType