How to declare an array without specific size?

后端 未结 4 1340
情书的邮戳
情书的邮戳 2021-01-02 20:06

How can I declare an array without specific size as a class member? I want to set the size of this array immediately in the class constructor. Is it possible to do such thin

4条回答
  •  天命终不由人
    2021-01-02 21:07

    You can use a vector, by including header file #include It can grow and shrink in size as required and vectors have built in methods/functions which can make your work easy.

提交回复
热议问题