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
What are virtual functions in c++?
What is the history of c++?
How do you initialize a string in c++?
How many namespaces are there in c++?
Define token in c++.
What is general format for a prototype?
What is c++ programming language?
How the programmer of a class should decide whether to declare member function or a friend function?
What is c++ coding?
What is fflush c++?
Explain register storage specifier.
Why do we use vector in c++?
How we can differentiate between a pre and post increment operators during overloading?
Specify some guidelines that should be followed while overloading operators?
What is the use of this pointer in c++?