标签:get new c++ prim class for c++primer bsp read
1 auto getter() { 2 return new vector<int>(); 3 } 4 auto setter(vector<int>* vec) { 5 int x; 6 while (cin >> x) 7 vec->push_back(x); 8 return vec; 9 } 10 auto read(vector<int>* vec) { 11 for (auto fuck : *vec) 12 cout << fuck << ends; 13 } 14 int main() { 15 16 auto vec=getter(); 17 vec=setter(vec); 18 read(vec); 19 delete vec; 20 }
标签:get new c++ prim class for c++primer bsp read
原文地址:https://www.cnblogs.com/otakus/p/12956070.html