AW> Just wondering, if an array is passed to a function, is there a way
AW> to test for or find the end of the array without having the size of
AW> the array passed to the function?
Remeber that an array name itself is just a pointer to the very
first item.
Why no end exsists, can be tested for:
char c[20];
c[21] = 'a';
There is no bounds checking for c/c++ arrays. Unless you create
you're own array class, then you have to pass the size to the
function.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)
|