|
 |
Warp wrote:
> Mueen Nawaz <m.n### [at] ieee org> 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] nawaz org<<<<<<
anl
Post a reply to this message
|
 |