Re: Good links for handling with pointers?
On Oct 22, 10:06 pm, Kai-Uwe Bux <jkherci...@gmx.net> wrote:
Markus Pitha wrote:
you are surely right when you say that I'd rather use these libraries.
But my target is it to improve my C++ skills. I think that perfect
handling with pointers is one of the basics if someone wants to cope
with C or C++. And I think that my pointer knowledge is still
insufficient.
Uhm, handling of dynamic allocation is hardly one of the _basics_.
It depends on what you're doing. It's certainly basic to the
applications I work on: a client connects, and creates an
order---where'm I going to put it, if not in dynamic memory? On
the other hand, in such applications, handling dynamic
allocation is usually pretty trivial as well. When the order
has been fully processed, it removes itself from the order table
(actually a hash map) and delete's itself.
I'd also expect even a relative neophyte to be able to implement
simple dynamic data structures, like double linked lists.
It is a necessary skill, that much is true. And pointers are
part of the core language. However, I think that acquirering
pointer skills should come somewhat late in the learning
process.
Late, as compared to what? I'd teach pointers before exceptions
or writing (as opposed to usiing) templates. I'd probably teach
them before inheritance, virtual functions, and the rest.
On the other hand, I'd probably not teach everything about them
at that point.
[...]
Anyway, the most important knowledge about dynamic allocation
is the many ways of using the STL instead.
Not all of the ways. I'd certainly present std::vector and
std::string before pointers. I'd probably even present
iterators and algorithms, although I'm not sure. But I can't
quite seem teaching someone how to write and STL iterator before
he understands pointer basics.
I think that pointers (like the STL) need to be handled at
several different levels. Some basic uses should appear fairly
early, where as some of the most subtle parts probably aren't
ever needed by the average programmer.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34