C Programming Column
by Al Stevens


Listing One
namespace personnel {
  class employee { };
  void paycheck(employee* emp)
  {
    // ...
  }
}
int main()
{
   personnel::employee empl;
   paycheck(&empl);
   // ...
   return 0;
}


Listing Two
int main()
{
   paycheck(0);
   // ...
   return 0;
}


Listing Three
namespace personnel {
  class employee {
    // ...
  };
  std::ostream& operator<<(std::ostream& os, const employee& em);
}
int main()
{
   personnel::employee empl;
   // ...
   std::cout << "Employee: ";
   std::cout << empl;
   return 0;
}





1


