I have a base class:
class Base
{
public:
functions...
private:
std::vector<float> privateElement;
}
and a derived one:
class Derived : public Base
{
public:
functions...
Derived(anotherElement) : privateElement(anotherElement)
{
}
}
My problem now is that everytime I try to build my project, the compiler (gcc 4.7.2) always complains about not being able to access privateElement
, like:
class Derived does not have any field named privateElement
std::vector<float> Base::privateElement is private
May anybody help me here?