what is smart pointer & use of the smart pointer ???
Answer Posted / satya
Smart pointers are objects which store pointers to
dynamically allocated (heap) objects. They behave much like
built-in C++ pointers except that they automatically delete
the object pointed to at the appropriate time. Smart
pointers are particularly useful in the face of exceptions
as they ensure proper destruction of dynamically allocated
objects. They can also be used to keep track of dynamically
allocated objects shared by multiple owners.
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
Can a Structure contain a Pointer to itself?
What is searching? Explain linear and binary search.
how to explain our contribution in the project?
What is the most common mistake on c++ and oo projects?
What is a driver program?
Can I learn c++ without learning c?
How do you clear a buffer in c++?
What is std :: flush?
Which function cannot be overloaded c++?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
Difference between delete and free.
Can a function take variable length arguments, if yes, how?
Can we sort map in c++?
What is the extraction operator and what does it do?
Explain the register storage classes in c++.