So i have problem trying to access a friend class properties, i need a pointer to the first item in the map.
class.h
class A{
private:
map<int,float> database;
public:
......
class B{
private:
map<int,float>::iterator it;
public:
friend class A;
B begin();
}
}
and implem.hxx
A::B A::B::begin(){
A::B it;
ite.it = database.begin();
return ite;
}
But it shows a problem when compiling: error: invalid use of non-static data member A::database
How can i resolve the problem?