POV-Ray : Newsgroups : povray.off-topic : Quick C++ question... : Re: Quick C++ question... Server Time
5 Sep 2024 03:24:09 EDT (-0400)
  Re: Quick C++ question...  
From: Warp
Date: 12 Nov 2009 12:51:54
Message: <4afc4b39@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> I'll have to look at this again (and 
> look up some syntax to see what "x::y : z" means :-)

  That might surprise many beginner and mid-level C++ programmers, but
there's nothing special going on there. You can pre-declare an inner
class and declare it later. The "x::y" part simply means "class y inside
class x". And the ": z" part means, of course, inheritance from z.

  In other words, this is perfectly valid (and quite handy):

class A
{
    class B;
    ...
};

class A::B
{
    ...
};

-- 
                                                          - Warp


Post a reply to this message

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