...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sugers.MyBigDude.Here

    ...

    hana1 wrote:[color=blue]
    > Hello guys,
    > I just have a quick question about C++. I am moving from Java to C++. And as
    > many of Java users know, all linked list and trees are already implemented
    > and you just have to instantiate them. Is tehre a simiar thing in c++, or I
    > have to write my own Linked list class?
    >
    > Thank you very much
    > Cheers
    >[/color]

    Plus, it also depends on what type are you handling with, for POD
    types as my dude already mentioned above, you can simply use STL
    containers, but for some other cases, it will be mostly
    self-implemented link-list or trees, etc...anyway, in C++, "things"
    like containers can be "borrowed" in the hierarchy to accomplish your
    purpose...
  • Dietmar Kuehl

    #2
    Re: ...

    Sugers.MyBigDud e.Here wrote:[color=blue]
    > Plus, it also depends on what type are you handling with, for POD
    > types as my dude already mentioned above, you can simply use STL
    > containers, but for some other cases, it will be mostly
    > self-implemented link-list or trees, etc...[/color]

    I tend to put arbitrary objects into STL containers. Those which I
    can't
    put there directly, e.g. because they are not Assignable, I put into
    STL
    containers via appropriate smart pointers. Can you please tell me in
    which cases I have to self-implement a link-list or a tree? Apparently
    I'm doing something really wrong...
    --
    <mailto:dietmar _kuehl@yahoo.co m> <http://www.dietmar-kuehl.de/>
    <http://www.contendix.c om> - Software Development & Consulting

    Comment

    Working...