what is smart pointer & use of the smart pointer ???
Answer Posted / swarna sekhar dhar
Smart pointers have been the subject of hecatombs of code
written and rivers of ink consumed by programmers and
writers around the world. Perhaps the most popular,
intricate, and powerful C++ idiom, smart pointers are
interesting in that they combine many syntactic and semantic
issues. This chapter discusses smart pointers, from their
simplest aspects to their most complex ones and from the
most obvious errors in implementing them to the subtlest
ones—some of which also happen to be the most gruesome.
In brief, smart pointers are C++ objects that simulate
simple pointers by implementing operator-> and the unary
operator*. In addition to sporting pointer syntax and
semantics, smart pointers often perform useful tasks—such as
memory management or locking—under the covers, thus freeing
the application from carefully managing the lifetime of
pointed-to objects
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain what is class definition in c++ ?
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
Differentiate between realloc() and free().
How are pointers type-cast?
Write a function that swaps the values of two integers, using int* as the argument type?
What is an orthogonal base class in c++?
Is java easier than c++?
What is a catch statement?
What is meant by the term name mangling in c++?
Why c++ is not a pure oop language?
Can we declare a base-class destructor as virtual?
What is the difference between ++ count and count ++?
What is vector pair in c++?
Describe protected access specifiers?