Vb vector sizes

Started by
4 comments, last by Pulse_19 19 years, 11 months ago
Is there any funtion that can get us the size of a vector? I have many vectors that are defined by the user input(Redim instruction) and after the input i wanna know the size of each vector (they can be all diferent sizes).
Advertisement
You mean the size of an std::vector? Sure, just use vector.size();
I haven''t used VB in a while but I believe UBound() would work.

Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud
Unless things have changed dramatically since I last heard, the STL is a C++ thing and not a VB thing...
"Game Programming" in an of itself does not exist. We learn to program and then use that knowledge to make games.
quote:Original post by Instruo
Unless things have changed dramatically since I last heard, the STL is a C++ thing and not a VB thing...

Of course...

Well, going on topic again, the answer is, if I understood right, to use UBound(array).

I mean, if you''re calling an "array" as a "vector"... Actually a "vector" is a type composing of X, Y and Z parts.

So you'll create an MMORPG, uh? Well, what about reading THIS?
Be sure to handle the UBound as the number of elements-1 (if using option base 0, the default).

-Nik

Niko Suni

This topic is closed to new replies.

Advertisement