Does ‘auto’ type assignments of a pointer in c++11 require ‘*’?
auto newvar1 = myvector; // vs: auto *newvar2 = myvector; Both of these are the same and will declare a pointer to std::vector<MyClass> (pointing to random location, since myvector is uninitialized in your example and likely contains garbage). So basically you can use any one of them. I would prefer auto var = getVector(), but … Read more