它不会影响我的代码,但是直到更新Visual Studio之前,我从未见过此类问题。我不知道那是否连接,但是我很困惑为什么会有问题。
#include <iostream>
#include <string>
#include <array>
using namespace std;
int main() {
const int SIZE = 3;
array<string, SIZE> names = { "S","A","W" };
array<string, SIZE>::iterator it;
cout << "names: \n";
for (it = names.begin(); it != names.end(); it++)
cout << *it << endl;
getchar();
return 0;
}
Run Code Online (Sandbox Code Playgroud)