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
练习要求使用迭代器将vector中的整数变为两倍,作者使用的是范围for循环。 我的程序代码如下,如有问题还请作者提出。谢谢! #include #include using namespace std;
int main(void) {
vector<int> s(10,42); for (auto i = s.begin(); i != s.end(); i++) { *i = 2 * (*i); cout << *i << ", "; } cout << endl; system("pause"); return 0;
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
练习要求使用迭代器将vector中的整数变为两倍,作者使用的是范围for循环。
我的程序代码如下,如有问题还请作者提出。谢谢!
#include
#include
using namespace std;
int main(void)
{
}
The text was updated successfully, but these errors were encountered: