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

What is pair in c++?

626


Is there any function that can skip certain number of characters present in the input stream?

585


What you know about structures in C++?

593


Which is not a valid keyword a) public b) protected c) guarded

740


Explain the difference between static and dynamic binding of functions?

547






Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

625


Will this c++ program execute or not?

599


Define anonymous class.

623


When one must use recursion function? Mention what happens when recursion functions are declared inline?

646


What is the difference between interpreters and compilers?

626


Explain friend class?

622


daily Routine of father

907


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

584


Why do we need runtime polymorphism in c++?

555


Explain operator overloading.

598