POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 09:20:46 EDT (-0400)
  Re: C++ questions  
From: Slime
Date: 27 Sep 2008 18:28:07
Message: <48deb377@news.povray.org>
>  Anyways, these are technical details you don't have to worry about.

On the other hand, my computer science 2 class focused almost entirely on 
the STL data structures and how to implement them yourself. It was a good 
way to learn the intricacies of making a class that has to deal with 
cleaning itself up, thus needing copy constructors and assignment operators 
and destructors. Understanding how this all works gets you closer to 
understanding how your code is compiled and the sort of things that are 
allowed (such as how a vector of vectors works internally).

Another way to learn that sort of thing is to do it the C way first, where 
you have a struct with some pointers in it, and you write your own functions 
to initialize the data, copy the data, and destroy the data. Then you learn 
why those functions are necessary and what happens if you try to avoid using 
them. Finally you see why C++'s approach is so nice, even though it's so 
hard to learn. The POV-Ray source was helpful when I was learning this, but 
I don't know how well it's split between C and C++ anymore.

However, all of this should wait until you're comfortable with pointers.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.