Exercice 3
Exercice 3
Exercice 3
struct Player{
int Num;
Player* next;
Player* prev;
};
struct list{
Player* head;
int numberList;;
};
List->head->prev->next = List->head->next;
List->head->next->prev = List->head->prev;
List->head = List->head->next;
cout << "Le Nombre " << temp->Num << " Est Supprimee de la Liste "
<< endl;
return ;
} else {
temp->next->prev = temp->prev;
temp->prev->next = temp->next;
List->head = temp->next;
temp->next = NULL;
temp->prev = NULL;
cout << "Le Nombre " << temp->Num << " Est Supprimee de la Liste "
<< endl;
return ;
}
int main(){
int tab[] = {1,2,3,4,5};
int Nmbpas;
list* li = remplir_tab(tab,sizeof(tab)/sizeof(int));
cout << "Entrer Nombre de Pas : ";
cin >> Nmbpas ;
while (!is_left(li)){
eliminer(li,Nmbpas);
}