
-----------------------------------
The_$hit
Tue Jun 21, 2005 6:40 pm

size of an array
-----------------------------------
does any one know the function to find the size of an array?

-----------------------------------
wtd
Tue Jun 21, 2005 7:05 pm

Re: size of an array
-----------------------------------
does any one know the function to find the size of an array?

Use std::vector instead of an array.

-----------------------------------
1of42
Tue Jun 21, 2005 7:28 pm


-----------------------------------
To be more clear, there is no function to find the size of an array, since an array is just a glorified pointer. You have to manually keep track of the size of the array yourself.

Oh - use a vector ;)

-----------------------------------
Cinjection
Tue Jun 21, 2005 7:53 pm

Re: size of an array
-----------------------------------

Use std::vector instead of an array.

Dude, you want to tell me why in all your C++ posts you use std::  ? Just put 

using namespace std;

-----------------------------------
Andy
Tue Jun 21, 2005 8:15 pm


-----------------------------------
because its more standard.. if we simply told them to use vector, then they'll come back saying it doesnt work and blah blah.. but if u use std::vector, then it'll work no matter what, plus it keeps the file size down

-----------------------------------
wtd
Tue Jun 21, 2005 8:22 pm

Re: size of an array
-----------------------------------

Use std::vector instead of an array.

Dude, you want to tell me why in all your C++ posts you use std::  ? Just put 

using namespace std;

Lots of stuff lives in the std namespace.  I don't want all of it my namespace.

-----------------------------------
The_$hit
Tue Jun 21, 2005 8:25 pm


-----------------------------------
i need to use pointers tho.... and i need to se how many values are passed through the parameters. Is there any way of doing this with pointers or arrays?

-----------------------------------
wtd
Tue Jun 21, 2005 8:54 pm


-----------------------------------
How about showing us what you do have, or even describing what you're actually trying to accomplish.
