Answers for "c++ get pointer from unique_ptr"

C++
0

c++ get pointer from unique_ptr

#include <memory>

std::unique_ptr<int> myUniquePtr = std::unique_optr<int>(new int(5));
int* rawPtr = myUniquePtr.get();
Posted by: Guest on September-15-2020

Browse Popular Code Answers by Language