标签:lsp void std return 指针 ack tab 通过 item
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include<iostream> #include<vector> using namespace std; int main( void ) { vector< int >array; array.push_back( 100 ); array.push_back( 300 ); array.push_back( 300 ); array.push_back( 500 ); vector< int >::iterator itor; for (itor = array.begin(); itor != array.end(); itor++) { if (*itor == 300 ) { itor = array.erase(itor); } } for (itor = array.begin(); itor != array.end(); itor++) { cout << *itor << " " ; } return 0 ; } |
100 300 300 500
100 300 500
100 500
程序错误
答案B 错选C
标签:lsp void std return 指针 ack tab 通过 item
原文地址:https://www.cnblogs.com/kxzh/p/9106342.html