What are smart pointer? Whats its use?
Answer / 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 |
difference between macro and function?
How is modularity introduced in C++?
what is the emaning of '#include" "'?
What is the most powerful coding language?
Is it possible to have a recursive inline function in c++?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
What is private public protected in c++?
Does c++ have string data type?
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
Why should we use null or zero in a program?
What is the Difference between "C structure" and "C++ structure"?
How to stop conversions among objects?