POV-Ray : Newsgroups : povray.programming : Vectors in C++ : Re: Vectors in C++ Server Time
6 Oct 2024 13:54:13 EDT (-0400)
  Re: Vectors in C++  
From: Warp
Date: 17 Dec 2002 05:15:56
Message: <3dfef95c@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   If the 'std::vector<double>' definition is used just a couple of times
> in the file, then it's not too much trouble to write the 'std::' prefix.
> If it's used tens of times, then I might write "using std::vector;" to
> pop it out of the namespace.

  By the way, there's another alternative to this. If 'std::vector<double>'
is used a lot, then you could write this at the beginning of the cpp file:

typedef std::vector<double> DVec;

  Then you can use 'DVec' instead.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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