Warning: untested-code example (should get the idea across, at least)
class A
{
... // details omitted
private:
int m_count;
friend void B::AdjustA(int);
};
class B
{
... // details omitted
void AdjustA(int i)
{
m_pA->m_count += i;
}
private:
A * m_pA;
};
B::AdjustA will show m_count as underlined in squiggly-red, with a tooltip from VAX saying "Error: member A::m_count (declared at line ...) is inaccessible"