What are smart pointer? Whats its use?

Answer Posted / amit wagh

Smart Pointer is basically a class implementation, which
wraps around a pointer and provided functionalities like
ownership of allocated memory proper cleanup.
Smart pointers are used when dealing with memory allocated
on heap.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you clear a buffer in c++?

723


What are exceptions c++?

778


What is fixed in c++?

766


What is atoi?

736


Can malloc be used in c++?

792


What is the use of function pointer?

755


Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D

3388


What is prototype in c++ with example?

731


What are the two main components of c++?

825


what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

1996


What apps are written in c++?

808


Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2215


How to access a variable of the structure?

777


Which software is used for c++ programming?

824


What is switch case in c++ syntax?

825