P
Piotr Sawuk
First off, thanks for the help, this group was a great support
for my efforts of learning c++. However, yet again I plan to
throw away what I programmed and re-use a little more of what
stl has to offer:
I would like to create a list of list-nodes of a smaller list
(preferably slist) so that I could iterate through that smaller
list, and iterate through the big list without omitting any
element of the small list. However, the problem is that the
class-name of a list-node isn't standardized. Am I wrong? What
is the usual way to cope with this portability-problem?
Similarily I would like to alter that container's behaviour
so that new list-elements are initialized right into the
list-node without previous initialization and copy-constructor,
i.e. I want to override node-creation so that an object
can get created by a (child inheriting from) list-class
as a node within the list, and not as a stand-alone object.
Here again portability might become a problem. Do I really
need to copy all the source-code from gcc's stl-implementation
right into my own sourcefiles in order to have a portable
program? Doesn't this defy the very purpose of stl?
Can anyone propose a programming-language or library where
my problems can get solved more elegantly?
for my efforts of learning c++. However, yet again I plan to
throw away what I programmed and re-use a little more of what
stl has to offer:
I would like to create a list of list-nodes of a smaller list
(preferably slist) so that I could iterate through that smaller
list, and iterate through the big list without omitting any
element of the small list. However, the problem is that the
class-name of a list-node isn't standardized. Am I wrong? What
is the usual way to cope with this portability-problem?
Similarily I would like to alter that container's behaviour
so that new list-elements are initialized right into the
list-node without previous initialization and copy-constructor,
i.e. I want to override node-creation so that an object
can get created by a (child inheriting from) list-class
as a node within the list, and not as a stand-alone object.
Here again portability might become a problem. Do I really
need to copy all the source-code from gcc's stl-implementation
right into my own sourcefiles in order to have a portable
program? Doesn't this defy the very purpose of stl?
Can anyone propose a programming-language or library where
my problems can get solved more elegantly?