In my game engine project, I make extensive use of the STL, mostly of the std::string and std::vector classes.
In many cases, I have to ite
C++11 has a new container aware for loop syntax that can be used if your compiler supports the new standard.
#include
#include
#include
using namespace std;
int main()
{
vector vs;
vs.push_back("One");
vs.push_back("Two");
vs.push_back("Three");
for (const auto &s : vs)
{
cout << s << endl;
}
return 0;
}