Merci, tout est clair ^^
Pour résumer, je pourrais donc faire comme ceci :
Où je déclare IMPLANTE uniquement dans le main.cpp.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 #ifndef FILE__A #define FILE__A class A { public: A(); bool uu() inline int tt(); template<typename T> T ch(T h = 0); protected: bool u; int t; int c; }; A::A() : u(true), t(8), c(1) { } #ifdef IMPLANTE bool A::uu() { return u; } #endif //IMPLANTE inline int A::tt() { return t; } template<typename T> T A::ch(T h) { if(h == 1) return h + c; } #endif //FILE__A