In my header file I want to avoid using #include but my class will have a vector or a pointer to a vector. I'm content with just a pointer, but I can't figure out how to declare it. Will I have to declare it as a void* and always cast it? That would be lame.
// What do I type here to forward declare vector?
class Counters
{
Counters();
void inc(const char* s);
void print();
void clear();
private:
std::vector<int>* Counts;
int total;
};
Please note carefully that I only want a POINTER TO a container to be stored in my class, NOT a container. The size of pointers is known without needing to refer to the declaration of the container, so please do not answer that this can't be done because the compiler needs to know the container declaration.