#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> vec;
vec.push_back("for");
vec.push_back("each");
for each (int str in vec) {
cout << str << endl;
}
return 0;
}
std::vector(int, std::allocator<int>>::iterator std::vector<int, std::allocator<int>>::begin()
+1 オーバーロード
Error: "std::vector<int, std::allocator<int>>"型の式では'for each'ステートメントは実行できません
というエラーが表示されます。どうすればいいのでしょうか?
VisualStudio2012です。