-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (42 loc) · 697 Bytes
/
main.cpp
File metadata and controls
51 lines (42 loc) · 697 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
45
46
47
48
49
50
51
#include "etudiant.h"
//float division(int a, int b){
// if(b == 0)
// throw "Division par zero !!";
// return a/b;
//}
//
//main(){
// int a,b;
//
// cout<<"Donnez a: ";
// cin>>a;
// cout<<"Donnez b: ";
// cin>>b;
//
// try{
// cout<<division(a,b);
// }catch(const char* msg){
// cerr<<msg; //character error
// }
//
//
// cout<<"end";
//}
main(){
etudiant e1(1, "Azdad", "Anas");
etudiant e2(2, "Dabaghi", "Hamza");
etudiant e3(3, "Alami", "Hicham");
//e1.afficher();
tabEtudiant T(2);
try{
T.add(e1);
T.tailleActuelle();
T.add(e2);
T.tailleActuelle();
T.add(e3);
T.tailleActuelle();
}catch(expt* ex){
cout<<ex->getMess()<<endl;
}
cout<<"end";
}