Visual C++ 2010 accepts:
std::vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
for each (auto i in v)
std::cout << i << std::endl;
Is this a C++0x feature or a Microsoft extension? According to Wikipedia, the syntax of C++0x's for-each loop different:
int myint[] = {1,2,3,4,5};
for (int& i: myint)
{
std::cout << i;
}