Howdy, Stranger!

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

Categories

smart pointers

mangaisabamangaisaba Member Posts: 1
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

  • ImprovingImproving Member Posts: 91
    : 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.
  • CowboyDanCowboyDan Member Posts: 5
    : : 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.
  • Andre YoungAndre Young USAMember Posts: 0

    ________ ( http://forcoder.org ) free video tutorials and ebooks about // Scratch, PHP, Visual Basic, Ruby, C++, Visual Basic .NET, Python, Assembly, PL/SQL, C, Swift, Go, C#, MATLAB, Objective-C, Perl, JavaScript, R, Delphi, Java Transact-SQL, Prolog, Alice, Scala, Bash, ABAP, Hack, Apex, Awk, Rust, ML, D, Crystal, Ada, F#, Dart, Julia, Scheme, COBOL, Clojure, Lua, SAS, LabVIEW, VBScript, Lisp, Erlang, Logo, FoxPro, Fortran, Kotlin // _____________

Sign In or Register to comment.