// FRIEND - gives an outside class/function access to a class's protected and private members

#include <iostream>

using namespace std;

class Base
{
  public:
    Base() {  }
    ~Base() {  }

    friend void print(Base b);

  private:
    void private_base() { cout << "Private base" << endl; }
};

void print(Base b) { b.private_base(); }

int main()
{
  Base b;

  print(b);

  return 0;
}

// OUTPUT
// Private base

// EOF