I have a class with a private data member of type vector< A*>.
The class has two public methods that actually use vector<A*>::size_type:
- Method returning number of elements in the vector
- Method returning element in the vector by index
I can add to public section of the class the following typedef:
typedef vector::size_type SIZE_t;
but IMHO it exposes too many details about class implementation.
Another approach is to use size_t.
What do you think?
Use plain old
size_tfor both member functions.