C++ vector with dynamic item size

前端 未结 9 2241
无人及你
无人及你 2021-01-14 16:54

the C++ STL vector has a lot of decent properties, but only works when the size of each item is known at run-time.

I would like to have a vector class that features

9条回答
  •  不知归路
    2021-01-14 17:21

    You could use a vector of pointers to your sequence object - preferably smart pointers, to simplify memory management in the vector.

提交回复
热议问题