Question: I have a function prototype in the header file:

```
std::vector<std::vector<GenericBase* const> > allObserved();

```

and an boilerplate implementation (only so that it \*hopefully \* compile, although be useless) as

```
//Accessors
std::vector<std::vector<GenericBase* const> > GenericObserver::allObserved(){

    return std::vector<std::vector<GenericBase* const> >();
}

```

and I get 100 errors from the compiler. I have removed these functions from both files (via commenting) and then everything compiles fine. I've looked into vector.h documentation on cplusplus.com as well as other "vector of vector" questions and noone seems to be having the problem I am. 

Thanks in advance for the help.

Answer: 
The objects stored in a `vector` must be assignable, which isn't the case for `GenericBase* const`. Hence the compilation errors.

Perhaps you want `GenericBase const*` instead, to make the pointed-to objects constant (not the pointers themselves)? Anyway, you have to drop the top-level `const` qualifier.
May be you could try to remove the const

```
std::vector<std::vector<GenericBase*> > GenericObserver::allObserved()
{
    return std::vector<std::vector<GenericBase*> >();
}

```