i'm trying to create a method in a class that return a vector of objects.
In the class i create this object
vector<CObject> My_Objects;
where i put some objects in.
Now, i would like to create a method that returns this vector
1 2 3
vector<CObject> CCharacter::inventory() {
...
}
but this doesn't work. I get: \include\character.h|114|error: prototype for 'std::vector<CObject> CCharacter::inventory()' does not match any in class 'CCharacter'|