-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathetudiant.cpp
More file actions
45 lines (33 loc) · 773 Bytes
/
etudiant.cpp
File metadata and controls
45 lines (33 loc) · 773 Bytes
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
42
43
44
#include "etudiant.h"
etudiant::etudiant(){
}
etudiant::etudiant(int id,string n,string p):nom(n),prenom(p){
this->id = id;
}
void etudiant::afficher(){
cout<<id<<" - "<<nom<<" - "<<prenom;
}
//**********************************************************************
tabEtudiant::tabEtudiant(int n){
this->size = n;
this->crtSize = 0;
this->T = new etudiant[n];
}
void tabEtudiant::add(etudiant e){
if(crtSize < size){
T[crtSize] = e;
crtSize++;
}else{
// throw "Tableau est sature !";
throw new expt("Tableau est sature !");
}
}
void tabEtudiant::tailleActuelle(){
cout<<"Taille Actuelle: "<<crtSize<<endl;
}
//***********************************************************
expt::expt(string s): msg(s){
}
string expt::getMess(){
return msg;
}