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 is flush () in c++?
How much maximum can you allocate in a single call to malloc()?
What are the uses of pointers?
Can you write a function similar to printf()?
What is a tuple c++?
Can I learn c++ without knowing c?
Are there any special rules about inlining?
What are activex and ole?
What is the use of 'using' declaration in c++?
How to tokenize a string in c++?
What is a c++ vector?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
How important is c++?
Why was c++ made?
What are the types of pointer?