Friends
int plus (const box & left, const box & right) { // access to private data field value // is permitted, since plus is declare // as friend return left.value + right.value;}int minus (const box & left, const box & right) { // ERROR: will produce an error message // since access to private data field // is not permitted return left.value - right.value;}box a(3), b(4);int i = plus(a, b);