ubuntuguy
asked on
C++ Counting number of elements an array can hold
Hi I'm trying to get some skills in C++. I'm a total newbie here. So I'm trying to write a function that will count the number of elements that an array can hold without using a variable to hold this number.
I know in java I could say something like array.length(); I think this is also possible in C++, something like sizeof *array, but is there a way to calculate the size of the array without using sizeof or using a variable to hold the number?
I know in java I could say something like array.length(); I think this is also possible in C++, something like sizeof *array, but is there a way to calculate the size of the array without using sizeof or using a variable to hold the number?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.