#include <iostream>
#include <vector>
using namespace std;
vector<int>* build_vec(){
int x;
vector<int> v1;
while(cin>>x)
v1.push_back(x);
return new vector<int>(v1);
}
void print_vec(){
vector<int>* p = build_vec();
for(auto &i:(*p))
cout<<i<<" ";
cout<<endl;
delete p;
}
int main(int argc, char *argv[])
{
print_vec();
return 0;
}
c++ primer第五版练习12.6
最新推荐文章于 2023-08-04 15:03:38 发布