1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
   |  
class Monome{
public:
    int cof;
    int deg;
    Monome *suivant;
 
    Monome(int cof, int deg){
 this->cof=cof;
 this->deg=deg;
 }
 
};
 
class Polynome{
static int conteur;
int id;
public : int taille;
Monome *debut, *fin;
 
//-----------------constructeur-----------------------------
public: Polynome(){
    id=conteur;
    conteur++;
    debut=fin=NULL;
    taille=0;
}
 
void ajouter(int a, int b){
 
Monome *element;
if(taille==0){
       element->cof=a;
        element->deg=b;
        element->suivant=NULL;
        debut=element;
        fin=element ;
 
        //taille ++;
    }
} | 
Partager