I have the following declaration:
friend ostream& operator<<(ostream&,const List&);
and I have the following definition:
ostream& operator<<(ostream& out,const List& item) {
vector<List::Employee>::const_iterator It;
for (It=item.employees.begin();It!=item.employees.end();It++) {}
}
Employee is a structure of mine own,and employees is a private vector of Employee in class List. The compiler gives me the following errors:
std::vector<List::Employee,std::allocator<List::Employee>> List::employees is private
any ideas how to solve it?