Check out example codes for "c++ get pointer from unique_ptr". It will help you in understanding the concepts better.

Code Example 1

#include <memory>

std::unique_ptr<int> myUniquePtr = std::unique_optr<int>(new int(5));
int* rawPtr = myUniquePtr.get();

Learn ReactJs, React Native from akashmittal.com