8. (Smart Pointers Review) We include some easy exercises on the use of smart pointers. Answer the...
Question:
8. (Smart Pointers Review)
We include some easy exercises on the use of smart pointers.
Answer the following questions:
a) Use move semantics to create a shared pointer from another shared pointer and from a unique pointer.
b) Swap two shared pointers; swap two unique pointers.
c) Create a weak pointer from a shared pointer and from another weak pointer.
In all cases, determine what the reference count is and how resource ownership is addressed.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: