I keep getting this error and I don\'t understand what I do wrong: \" error: invalid use of incomplete type \'class Auftrag\'\" at method getAuftrae
Place the function definitions after the definition of the class Auftrag
.
For example
inline void Kunde ::addAuftrag(Auftrag *auftrag){
this->vpa.push_back(auftrag);
}
inline void Kunde ::getAuftraege() {
for (int i{0};i<vpa.size();i++)
cout << this->vpa.at(i)->getID();
}
The compiler has to know the definition of the class Auftrag
that to determine that it has such a data member as vpa
.