开发者

dynamic array of class

开发者 https://www.devze.com 2022-12-28 23:11 出处:网络
I want to make a dynamic array of class objects. Though it is dynamic I have to calcula开发者_如何学编程te some size before initiating them; what strategy should I apply?Use the std::vector class from

I want to make a dynamic array of class objects. Though it is dynamic I have to calcula开发者_如何学编程te some size before initiating them; what strategy should I apply?


Use the std::vector class from the standard library. That implements a strongly-typed dynamic array. It can be found inside the header <vector>.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号