We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int main() { vector<int> iv = { 1,2,3,4,5,6,7,8 }; vector<int>::iterator iter = iv.begin(), mid = iv.begin() + iv.size() / 2; while (iter != mid) { if (*iter == 3) { iter = iv.insert(iter, 2 * 3); ++iter; mid = iv.begin() + iv.size() / 2; } ++iter; } return 0; }
The text was updated successfully, but these errors were encountered:
🐮,我今天刚刚看到这里,也没注意,vscode运行也没报错,后面我在 for 循环里 加上 cout << __LINE__ << endl;,发现会一直循环,后面 vscode 自动结束循环了
cout << __LINE__ << endl;
Sorry, something went wrong.
这么写的话mid也在跟着后移吧
No branches or pull requests
The text was updated successfully, but these errors were encountered: