vector 类型赋值
vector<int> v={1,2,3}; //直接赋值
int a[]={1,2,3}; //通过int数组向vector赋值
vector<int> v(a,a+sizeof(a)/sizeof(*a));
vector<int> v={1,2,3}; //直接赋值
int a[]={1,2,3}; //通过int数组向vector赋值
vector<int> v(a,a+sizeof(a)/sizeof(*a));
本文标题:c++
本文链接:https://www.haomeiwen.com/subject/xewktttx.html
网友评论