Returning an object in C++

前端 未结 5 1013
一整个雨季
一整个雨季 2021-02-14 12:02

I am learning C++ from a background of mostly C and Java and I am curious on what is the best way to return an object in C++ without having to copy the object. From my understa

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-14 12:33

    If you want to use smart pointer in this case, maybe unique_ptr is a better choise.

提交回复
热议问题