I'm having some trouble understanding the concept of a friend operator.
*without* placing friend before an operator declaration, I shoudln't be able to acces the private members. However, this eems to work just fine:
1 2 3 4 5 6
voorraad2& operator+=(const voorraad2& x)
{
small += x.small;
big += x.big;
return *this;
}
It accesses the private members, even changes them...
How is this possible?