My assistant professor class is derived from two classes : enseigner class (which derive from personal) and PHD student ( whiche derive from Student class and student class dervie from peronal) i get the following error
"request for member nci is ambiguous"
nci is a private member of personal
enter code here
#include<iostream>
using namespace std;
#include "enseigneer.h"
#include "assistant_professor.h"
#include "associate_professor.h"
#include "professor.h"
void assistant_delete(assistant_professor**head_assis,assistant_professor **tail_assis)
{
int number;int pos=0;int sz=0;
assistant_professor *temp;
assistant_professor *search_1;
assistant_professor *current;
assistant_professor *to_free;
temp=*head_assis;
current=*head_assis;
cout<<"Enter the CIN number of the enseigner that you want to delete\n ";
cin>>number;
if(head_assis==NULL)cout<< "The list is empty you have to enter data first\n";
else
{
while (search_1!=NULL)
{
search_1=search_1->next;sz=sz+1;
}
if ((*head_assis)-> nci==number)
{
to_free=*head_assis;
(*head_assis)=(*head_assis)->next;
delete (to_free);
cout<< "\nThe student was deleted\n";
}
else if ((*tail_assis)->nci==number)
{
for (int i=0;i<sz-3;i++)
current=current->next;
delete(current->next);
current->next=NULL;
*tail_assis=current;
cout<< "\nThe enseigner was deleted\n";
}
else
{
{
while((temp!=NULL) and ((temp->nci)!=number))
{
temp=temp->next;pos=pos+1;
}
if (temp->next==NULL) cout<<"Please pay attention the enseigner you've entred doesn't exist in the list\n";
else
{
for (int i=0;i<pos-1;i++)
current=current->next;
to_free=current->next;
current->next=current->next->next;
delete(to_free);cout<< "\nThe enseigner was deleted\n";
}
}