cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
raw pointer to unique_ptr
raw pointer to unique_ptr
Jan 28, 2016 at 1:37am UTC
a10e29
(83)
Hello,
Is it possible to convert a raw pointer to a unique_ptr?
If so how would I do that?
Thanks in advance
Jan 28, 2016 at 8:04am UTC
TheIdeasMan
(6817)
Hi,
Not sure about converting, but a
unique_ptr
can
own
a pointer, see option 2 of the constructor.
http://en.cppreference.com/w/cpp/memory/unique_ptr/unique_ptr
Topic archived. No new replies allowed.