Copying from One Dynamically Allocated Array to Another C++

前端 未结 3 2064
北海茫月
北海茫月 2021-02-09 07:26

This seems like it should have a super easy solution, but I just can\'t figure it out. I am simply creating a resized array and trying to copy all the original values over, and

3条回答
  •  执笔经年
    2021-02-09 07:56

    I highly suggest replacing the arrays with std::vector. This data structure will resize as needed and the resizing has already been tested.

提交回复
热议问题