Salut,
je suis un d�butant C++ et je n'arrive pas � �crire la fonction operator+ qui permet l'addition de 2 abr et de cr�er un autre form� par les mots de 2 abr
quelles sont les �tapes pour �crire cette fonction?
Merci
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 class Noeud { private: string mot; Noeud *pGauche; Noeud *pDroite; public: Noeud(string word); Noeud * chercher(string un_mot); }; class ABR { private: Noeud * pRacine; string path; public : ABR(); ABR(string chemin);//creer un abr avec le contenu du fichier ~ABR(); void ajouter(string un_mot); friend ABR& operator+(const ABR &x, const ABR& y); }; ABR &operator +(const ABR &x, const ABR &y) { ............... }
Partager