Re: Function to return number of values in an array

Posted 02 February 2011 - 11:30 AM

no you have to keep track of the size of the array your self. a clean solution is to use std::vector or std::deque. they allow you to use dynamically sized arrays and not have to worry about allocation and the size of the array as the size() method allows you to get the size at any time. also they are extremely well optimized which is a big bonus. here take a look at this