for this code:
for(auto x=v.begin(); x!=v.end(); x++) cout<<*x<<" "; I get the following error:
error: 'x' does not name a type for(auto x=v.begin(); x!=v.end(); x++) Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack Internalfor this code:
for(auto x=v.begin(); x!=v.end(); x++) cout<<*x<<" "; I get the following error:
error: 'x' does not name a type for(auto x=v.begin(); x!=v.end(); x++)
autowas introduced with C++11autoin this guise is C++11 onwards.autokeyword has been in every C++ version. It was repurposed in C++11.