POV-Ray : Newsgroups : povray.off-topic : Computer language quirks : Re: Computer language quirks Server Time
30 Jul 2024 02:15:21 EDT (-0400)
  Re: Computer language quirks  
From: Darren New
Date: 14 May 2011 12:34:57
Message: <4dceaf31$1@news.povray.org>
On 5/14/2011 0:40, Warp wrote:
>    For example, in C the only way to make an explicit cast is using the
> syntax "(type) variable". However, C++ added the possibility of writing
> such casts as "type(variable)". This allows for 'type' to not only be a
> basic type, but also a class (in which case it would be a constructor
> call).

That's cool. I'm still not sure whether to like C++ or hate it. ;-)

So what's the static_cast<...> bit all about, then? Is that just something 
easy to grep for, or does it have different semantics than a regular cast?

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

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