• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

When should we use shared pointers and when to use uniqe pointers?

Is there a rule when to prefer shared pointers and when to use uniqe pointers? Which of those is the more prefered pointer in cpp?

c++pointersshareduniqe
12th Apr 2020, 5:17 PM
SanCur
1 Answer
+ 1
hi there you will find your answer here. https://www.google.com/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-use-one&ved=2ahUKEwjRi6zz0-PoAhVV73MBHdY4DSAQFjAOegQICBAB&usg=AOvVaw1KjwNjcT-BTUQhvMpHOAxT
12th Apr 2020, 7:48 PM
minirkk
minirkk - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Hi help me I am new
2 Votes
My codebits section is full of deleted codes
12 Votes
Why are there like 10 community-made lessons?
0 Votes
How do I solve all test cases for popsicles problem?https://www.sololearn.com/coach/3?ref=app
0 Votes
Why so many mathematical questions in challenges?
0 Votes
Where did mess up....
1 Votes
Where can I learn c#
0 Votes
I have an error in a problem and I don't know what the correct answer is
1 Votes
Feedback on my portfolio
0 Votes
best language if i want to learn about AI
0 Votes