Suppose I have a code:
Class A have items which is pushed into a vector...I want to access Class A element from class B through A's vector..
friend class B;
vector<A> data; //store info in vector
vector<A>::iterator p= a.data.begin();
while(p != a.data.end())
However, it doesnt show up. May I get any advice?