POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 05:12:46 EDT (-0400)
  Re: C++ questions  
From: Mueen Nawaz
Date: 30 Sep 2008 21:36:30
Message: <48e2d41e$1@news.povray.org>
Warp wrote:
> Mueen Nawaz <m.n### [at] ieeeorg> wrote:
>> Invisible wrote:
>>> Hmm, so vectors seem to be able to do some pretty death-defying stuff!
>>> They're variable size, but they manage their memory automatically.
> 
>>         And they let you go out of bounds, too!
> 
>   Well, you could use the at() member function if you want it to perform
> bounds checks.

	Well, if we're dealing with vectors, why not just check its size? Is at
more efficient?

	Anyway, I wasn't complaining - I just wanted to make sure he knew that
in C++, nothing stops you from going out of bounds (probably to maintain
efficiency of lookups). Many other popular languages will die if you try
that.

-- 
When you die, you lose a very important part of your life.
                -- Brooke Shields


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

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