1.C++ Primer 习题 4.32-33
/* C++ Primer 习题 4.32-33 * By Ceeji */ #include <iostream> #include <vector> using namespace std; typedef vector<int> vector_int; int main() { int sz [10] = {1,4,7,8,3,9,0,4,8,5}; vector_int intarr = vector_int(sz, sz + 10); int sz_new [10]; vector_int::iterator iter = intarr.begin(); int c = 0; while (iter != intarr.end ()) { sz_new [c++] = *(iter++); } } |