POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 07:20:25 EDT (-0400)
  Re: C++ questions  
From: Warp
Date: 26 Sep 2008 08:58:06
Message: <48dcdc5e@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Copy...constructor...? x_x

  Usually you don't need copy constructors unless you have pointers as
member variables of your class and you explicitly allocate memory to
them with 'new'. But we don't do that, do we? ;)

  If you want a quick crash course on copy constructing when the class
allocates memory explicitly, check this:

http://warp.povusers.org/c++test/

  (There are actually a few other situations where a copy constructor is
mandatory for a class to work properly, but they are slightly advanced
stuff.)

-- 
                                                          - Warp


Post a reply to this message

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