bonjour à tous.
Je ne comprend pas pourquoi il ne tient pas compte de la définition de la classe:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
52
53
54
55
56
57
58
59 #ifndef OBJETS_HPP_ #define OBJETS_HPP_ class Noeud{ public: virtual ~Noeud(); virtual void prod()=0; }; class Reste:public Noeud{ private: SuiteCar *lignen; Reste *resten; public: Reste(SuiteCar *x,Reste *y); ~Reste(); void prod(); }; class SuiteCar:public Noeud{ private: char valex; SuiteCar *ligne1n; public: SuiteCar(char x,SuiteCar *y); ~SuiteCar(); void prod(); }; class Fin:public Noeud{ private: bool finLigne; public: Fin(bool x); void prod(); }; class Suite:public Noeud{ private: SuiteCar *lignen; Reste *resten; public: Suite(SuiteCar *x,Reste *y); ~Suite(); void prod(); }; class SuiteLignes:public Noeud{ private: Suite *lignesn; Fin *factn; public: SuiteLignes(Suite *x,Fin *y); ~SuiteLignes(); void prod(); }; #endif /* OBJETS_HPP_ */g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"objets.d" -MT"objets.d" -o "objets.o" "../objets.cpp"
In file included from ../objets.cpp:8:0:
../objets.hpp:26:4: error: ‘SuiteCar’ does not name a type
../objets.hpp:27:4: error: ‘Reste’ does not name a type
../objets.hpp:29:19: error: expected ‘)’ before ‘*’ token
../objets.hpp:47:2: error: ‘SuiteCar’ does not name a type
../objets.hpp:50:17: error: expected ‘)’ before ‘*’ token
quelqu'un a une idée?
Partager