Size of a char* array with different lengths

Hi!

I have an array of char* and I just want to know, how much char* there are in the array. Normally you could do this with: sizeof(array)/sizeof(array[0]) but this doesn't work, because the entries don't have the same length.... Does anyone know how to make it better?

regards
You would have to know it yourself. Btw, sizeof(array)/sizeof(array[0]) only works if you haven't passed the array to a function or something.
Yes, I know, thx , I also know how to make it with a loop, but I'm searching for a easy, one-line solution, that I could write into the declaration....

regards
For functions, let the caller pass the size of the array. Or even better, just use vectors.
Topic archived. No new replies allowed.