Concatenating two std::vectors

后端 未结 25 2338
予麋鹿
予麋鹿 2020-11-22 12:00

How do I concatenate two std::vectors?

25条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 12:24

    std::vector first;
    std::vector second;
    
    first.insert(first.end(), second.begin(), second.end());
    

提交回复
热议问题