|
![](/i/fill.gif) |
In article <chrishuff-A5A55D.12215206092000@news.povray.org> , Chris Huff
<chr### [at] mac com> wrote:
> Why would I use code from someone else for something as simple as a
> linked list or tree?
Because the someone else put a lot of R&D into it and optimised the code for
your platform, while you have to optimise it yourself otherwise...
> Ok, much of the problem is that I can't find a good reference about the
> best way to use the STL, and templates have been nothing but headaches
> to me.
Well, then just use trial and error. Start with simple types like strings,
vectors and lists first. Use them in simple cases, play around with them,
and whenever something does not work as expected, try to find out why, don't
just give up. Don't be afraid, just try - that is how I got started with
it after reading Stroustrup's book :-)
As for books, there are a few in the Addison-Wesley Professional Computing
Series for example (yes, they are expensive, but you can learn a lot from
them, and some will surely be available in your local college library).
Of course there is the Stroustrup "The C++ Programming Language 3rd Ed."
which explains at least the basic types mentioned above well enough to use
them, and it also explains templates. For understanding the complex object
oriented models behind lots of libraries (not just the STL, but also i.e.
most GUI frameworks) try the classic book "Design Patterns: Elements of
Reusable Object-Oriented Software".
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |