Bonjour,
Le programme ci-dessous :
Code:
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 #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { printf("Hello !!\n"); try { printf("1\n"); int *num; num=NULL; *num=8556; } catch(int o) { printf("Exception\n"); } printf("fin ! \n"); }
compilé en linux avec comme commande :
Le programme s’exécute , mais l'exception ne fonctionne pas.Code:g++ -o main main.c -lpthread
Qu'est ce que je dois faire ?
Merci