[cs13001] Lab help

Mikhail Nesterenko mikhail at cs.kent.edu
Sun Nov 18 09:54:37 EST 2012


>
> When trying to use "sort" in my member function "output(void)", I keep
> getting an error message saying it does not exist. Is sort not available in
> classes?

make sure that you include <algorithm>

> Also, what is the use of "int vectorSize (void) const;" in the header? What
> is that used for?

It is an accessor that returns the size of the vector. You do not have
to implement it if you do not need it: it is possible to declare a
member function in a class definition and do not provide its
definition.

Thanks,
-- 
Mikhail


More information about the cs13001 mailing list