1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#ifndef TABLEAUINT_H_INCLUDED
#define TABLEAUINT_H_INCLUDED
class TABLEAU_INT {
public :
TABLEAU_INT(const int nbElement=TAILLE_PAR_DEFAUT) {Init(nbElement,0);}// Initialise nbElement de tableau
TABLEAU_INT(int *table,int nbElement) {Init(nbElement,table);}// Copie d'un tableau : t[nbElement]
TABLEAU_INT(const TABLEAU_INT &original) {Init(original._dimension,original.pTableau);}// Constructeur de recopie
~TABLEAU_INT() {delete [] pTableau;}// Destructeur
private :
void Init(int,int *);
int _dimension;
int *pTableau;
static const int TAILLE_PAR_DEFAUT = 10;
};
#endif // TABLEAUINT_H_INCLUDED |