previous | start | next

Constructor

Implementation of second constructor and the destructor:

Employee::Employee(char nm[], double sal)
{
  name = new char[strlen(nm) + 1];
  strcpy(name, nm);
  salary = sal;
}
   


previous | start | next