Friday 18 August 2017

Insert node at end



//---------------------------------
Insert node at end------------------------------------
void Employee::add_at_end( )
{
       EmployeeNode* temp = new EmployeeNode;
       cout << "\nEnter Employee's Name: ";
              cin >> temp->name;
       cout << "Enter Employee's Salary: ";
              cin >> temp->salary;
       temp->next = first; 
       first = temp;
}

0 comments: