copying c array of strings into vector of std::string

后端 未结 4 1411
盖世英雄少女心
盖世英雄少女心 2020-12-21 12:02

I need to store elements of a c array of strings in a vector.

Basically I need to copy all the elements of a c array into a vector.

4条回答
  •  半阙折子戏
    2020-12-21 12:41

    You use the insert method to add content to a vector. Take a look at the sample fragment from here: http://www.cplusplus.com/reference/stl/vector/insert/

提交回复
热议问题