smart pointers

Hello!!!
I'm a student in the final year.I wrote a test in a company last week.They have asked what is smart pointers?All the question were in c and c++.If anyone knows please give me the answer.
Thanks.................

Comments

  • : Hello!!!
    : I'm a student in the final year.I wrote a test in a company last week.They have asked what is smart pointers?All the question were in c and c++.If anyone knows please give me the answer.
    : Thanks.................
    :

    A smart pointer is simply an object that behaves like a pointer. They have all sorts of uses from ownership of other objects thru to reference counting and beyond.
    The only smart pointer per se that is part of the c++ language is std::auto_ptr
    There are some good smart pointer classes available at www.boost.org
    Look at the code of those to see what smart pointers can do.
  • : : Hello!!!
    : : I'm a student in the final year.I wrote a test in a company last week.They have asked what is smart pointers?All the question were in c and c++.If anyone knows please give me the answer.
    : : Thanks.................
    : :
    :
    : A smart pointer is simply an object that behaves like a pointer. They have all sorts of uses from ownership of other objects thru to reference counting and beyond.
    : The only smart pointer per se that is part of the c++ language is std::auto_ptr
    : There are some good smart pointer classes available at www.boost.org
    : Look at the code of those to see what smart pointers can do.
    :
    What about iterators that are used in the stl. I think those are smart. They allow programmers to perform algorithms on stl containers just like normal arrays: random_shuffle, sort, search. I think thats pretty smart.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories