| 12
 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
 42
 43
 44
 45
 46
 
 | class Complexe{
      float reel;
      float imaginaire;
public:
      Complexe(float,float);
      float GetReel();
      float GetImaginaire();
 
      };
 
Complexe::Complexe(float r,float i):reel(r),imaginaire(i){}
 
float Complexe::GetReel(){
    return reel;
}
float Complexe::GetImaginaire(){
    return imaginaire;
}
 
class Matrice{
      Complexe*** p_Im;
public:
      Matrice(int,int);
      void SetAt(int,int,Complexe*);
      void Supp(int,int);
      Complexe* Get(int,int);
      };
 
Matrice::Matrice(int l,int c){
                     p_Im=new Complexe**[l];
                     for(int i=0;i<c;i++){
                             p_Im[i]=new Complexe*[c];
                             }
                     }
 
void Matrice::SetAt(int l,int c,Complexe* n){
     p_Im[l][c]=n;
     }
 
void Matrice::Supp(int l,int c){
     p_Im[l][c]=NULL;
     }
 
Complexe* Matrice::Get(int l,int c){
         return p_Im[l][c];
         } | 
Partager