Salut!

Je n'arrive pas à trouver de cas similaire au mien sur internet, et du coup je suis coincé.
En fait, j'ai implémenté une classe qui doit utiliser une méthode pour générer un facteur, et elle devrait normalement l'utiliser.
Mais j'ai systématiquement (4 fois pour 4 utilisations) la même erreur. Je vous montre le code:

(classe)
MenuColonneCentree.h:
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
#ifndef MENUCOLONNECENTREE_H_INCLUDED
#define MENUCOLONNECENTREE_H_INCLUDED
 
#include <SFML/Graphics.hpp>
#include <string>
#include <vector>
 
#include "DecoupageQuadratiqueMiroir.h"
 
using namespace sf;
using namespace std;
 
 
 
class MenuColonneCentree
{   private:
        // Atttributs initialisés par le constructeur
        RenderWindow & window;
 
        // Autres attributs
        Font fonte;
        Color couleur;
        double width, height, hauteurTextePrincipal, hauteurTexteSecondaire, X, j;
        int options, animation, etape, longueurAnimation;
        vector<vector<Text> > texte;
        vector<vector<double> > posX, posY;
 
    public:
        int ligneSelectionnee; // Numéro de la ligne sélectionée (en partant de zéro)
        bool etatAnimation; // Temoin d'animation (true = animation en cours)
        bool etatExistence; // Temoin d'existence (true = objet actif)
 
        MenuColonneCentree(RenderWindow & argWINDOW);
 
        void SetContenu(vector<vector<string> > argCONTENU);
 
        void ChoixAnimation(int argNUMERO);
 
        void MouvementPreselection(int argMOUVEMENT);
 
        void Animation(int argSTEP);
};
 
#endif // MENUCOLONNECENTREE_H_INCLUDED
(classe; erreurs ici)
MenuColonneCentree.cpp:
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
//#define SUIVI
 
#include <SFML/Graphics.hpp>
 
#include <windows.h>
#include <string.h>
#include <cstdlib>
 
#ifdef SUIVI
#include <iostream>
#endif
 
#include "MenuColonneCentree.h"
 
using namespace std;
using namespace sf;
 
 
 
// Implémentation des méthodes de la classe
MenuColonneCentree::MenuColonneCentree(RenderWindow & argWINDOW):
window(argWINDOW) // Liste d'initialisation
{   Font fonte; // Fonte pour le texte des menus
    fonte.loadFromFile("Fontes/FonteGVSC.ttf"); // Chargement d'un fichier font
 
    Color couleur; // Couleur pour le texte des menus
    couleur.r=255; couleur.g=100; couleur.b=0; couleur.a=255; // Création d'une couleur (rouge-orangé opaque)
 
    width=VideoMode::getDesktopMode().width; // Récupérer résolution horizontale de l'écran
    height=VideoMode::getDesktopMode().height; // Récupérer résolution verticale de l'écran
 
    hauteurTextePrincipal=height/13;
    hauteurTexteSecondaire=2*height/39;
 
    longueurAnimation=15;
 
    // Présélection par-défaut de l'animation zéro
    animation=4;
 
    #ifdef SUIVI
    cout << "MenuColonneCentree, MenuColonneCentree OK" << endl;
    #endif
}
 
 
 
void MenuColonneCentree::SetContenu(vector<vector<string> > argCONTENU)
{   // Vider les vecteurs
    texte.clear();
    posX.clear();
    posY.clear();
 
    options=(argCONTENU.size());
 
    ligneSelectionnee=0; // Présélection de la première ligne
 
    for (int index(0); index < options; index++)
    {   texte[index][0].setString(argCONTENU[index][0]);
        texte[index][1].setString(argCONTENU[index][1]);
 
        texte[index][0].setFont(fonte);
        texte[index][1].setFont(fonte);
 
        texte[index][0].setColor(couleur);
        texte[index][1].setColor(couleur);
 
        texte[index][0].setStyle(0);
        texte[index][1].setStyle(0);
 
        posX[index][0]=width/2;
        posX[index][1]=2*width/3;
 
        posY[index][0]=(7-options+2*index)*hauteurTextePrincipal;
        posY[index][1]=(8-options+2*index)*hauteurTextePrincipal;
    }
 
    etatAnimation=false;
    etatExistence=true;
 
    #ifdef SUIVI
    cout << "MenuColonneCentree, SetContenu OK" << endl;
    #endif
}
 
 
 
void MenuColonneCentree::ChoixAnimation(int argNUMERO)
{   animation=argNUMERO;
 
    switch (animation)
    {   case 0: etatAnimation=true;  break; // Animation standard
        case 1: etatAnimation=false; break; // Entrée en glissant pas la droite
        case 2: etatAnimation=false; break; // Sortie en glissant pas la gauche
        case 3: etatAnimation=false; break; // Sortie en glissant pas la droite
        case 4: etatAnimation=true;  break; // Animation zéro (ne rien faire)
    }
 
    etape=0;
    X=0;
 
    for (int index(0); index < options; index++)
    {   texte[index][index].setCharacterSize(hauteurTextePrincipal);
        texte[index][index].setOrigin(texte[index][index].getGlobalBounds().width/2, hauteurTextePrincipal/2);
 
        texte[index][index+1].setCharacterSize(hauteurTexteSecondaire);
        texte[index][index+1].setOrigin(texte[index][index+1].getGlobalBounds().width/2, hauteurTextePrincipal/2);
    }
 
    etatAnimation=false;
 
    #ifdef SUIVI
    cout << "MenuColonneCentree, ChoixAnimation OK" << endl;
    #endif
}
 
 
 
void MenuColonneCentree::MouvementPreselection(int argMOUVEMENT)
{   // argMOUVEMENT : mouvement à effectuer (+ = descendre ; 0 = rester ; - = monter)
 
    ligneSelectionnee+=argMOUVEMENT;
 
    if (ligneSelectionnee > options) {ligneSelectionnee=0;}
    else if (ligneSelectionnee < 0)  {ligneSelectionnee=options;}
 
    #ifdef SUIVI
    cout << "MenuColonneCentree, MouvementPreselection OK" << endl;
    #endif
}
 
 
 
void MenuColonneCentree::Animation(int argSTEP)
{   // argSTEP : nombre d'étapes à passer dans l'animation
 
    etape+=argSTEP; // Incrémenter l'index d'animation
 
    switch (animation)
    {   case 0: // Animation standard de la ligne sélectionnée
            if (etape >= longueurAnimation-1) {etape-=longueurAnimation;} // Ne pas dépasser 14
 
            j=1+DecoupageQuadratiqueMiroir(etape, longueurAnimation); // ERROR: undefined reference to 'DecoupageQuadratiqueMiroir(int, int)'
 
            texte[ligneSelectionnee][0].setCharacterSize(j*hauteurTextePrincipal);
            texte[ligneSelectionnee][1].setCharacterSize(j*hauteurTexteSecondaire);
 
            texte[ligneSelectionnee][0].setOrigin(texte[ligneSelectionnee][0].getGlobalBounds().width/2, j*hauteurTextePrincipal/2);
            texte[ligneSelectionnee][1].setOrigin(texte[ligneSelectionnee][1].getGlobalBounds().width/2, j*hauteurTexteSecondaire/2);
        break;
        case 1: // Entrée en glissant par la droite
            if (etape >= longueurAnimation-1) // Ne pas dépasser longueurAnimation-1
            {   etape=longueurAnimation-1;
 
                etatAnimation=true;
            }
 
            X=width*DecoupageQuadratiqueMiroir(etape, longueurAnimation); // ERROR: undefined reference to 'DecoupageQuadratiqueMiroir(int, int)'
        break;
        case 2: // Sortie en glissant par la gauche
            if (etape >= longueurAnimation-1) // Ne pas dépasser longueurAnimation-1
            {   etape=longueurAnimation-1;
 
                etatAnimation=true;
                etatExistence=false;
            }
 
            X=width*DecoupageQuadratiqueMiroir(longueurAnimation-1-etape, longueurAnimation); // ERROR: undefined reference to 'DecoupageQuadratiqueMiroir(int, int)'
        break;
        case 3: // Sortie en glissant par la droite
            if (etape >= longueurAnimation-1) // Ne pas dépasser longueurAnimation-1
            {   etape=longueurAnimation-1;
 
                etatAnimation=true;
                etatExistence=false;
            }
 
            X=-width*DecoupageQuadratiqueMiroir(longueurAnimation-1-etape, longueurAnimation); // ERROR: undefined reference to 'DecoupageQuadratiqueMiroir(int, int)'
        break;
        case 4: // Animation zéro (ne rien faire)
        break;
    }
 
    for (int index(0); index == 2*(options+1); index++)
    {   texte[index][0].setPosition(posX[index][0]+X, posY[index][0]);
        texte[index][1].setPosition(posX[index][1]+X, posY[index][1]);
        window.draw(texte[index][0]);
        window.draw(texte[index][1]);
    }
}
(méthode)
DecoupageQuadratiqueMiroir.h:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
#ifndef DECOUPAGEQUADRATIQUEMIROIR_H_INCLUDED
#define DECOUPAGEQUADRATIQUEMIROIR_H_INCLUDED
 
using namespace std;
 
double DecoupageQuadratiqueMiroir(int argETAPE, int argNOMBREETAPES);
 
#endif // DECOUPAGEQUADRATIQUEMIROIR_H_INCLUDED
(méthode)
DecoupageQuadratiqueMiroir.cpp:
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
#include <iostream>
#include "DecoupageQuadratiqueMiroir.h"
 
using namespace std;
 
double DecoupageQuadratiqueMiroir(int argETAPE, int argNOMBREETAPES) // Fonction pour calculer le facteur de dilatation à appliquer en fonction du texte
{   double dividende(0.0);
    double diviseur(1);
    int index(0);
    int etape(argETAPE);
    int nombreEtapes(argNOMBREETAPES);
 
    while (index < argETAPE)
    {   if (index < argNOMBREETAPES/2)
        {   dividende+=index*index;
 
            index++;
        }
        else if (index == argNOMBREETAPES/2)
        {   index++;
        }
        else if (index > argNOMBREETAPES/2)
        {   index++;
 
            dividende+=(argNOMBREETAPES-index)*(argNOMBREETAPES-index);
        }
    }
 
    diviseur=dividende;
 
    while (index < argNOMBREETAPES)
    {   if (index < argNOMBREETAPES/2)
        {   diviseur+=index*index;
 
            index++;
        }
        else if (index == argNOMBREETAPES/2)
        {   index++;
        }
        else if (index > argNOMBREETAPES/2)
        {   index++;
 
            diviseur+=(argNOMBREETAPES-index)*(argNOMBREETAPES-index);
        }
    }
 
    return dividende/diviseur;
}
Et, question subsidiaire: DecoupageQuadratiqueMiroir est-elle le genre de fonctions qu'on peut inliner? (Je demande parce que j'ai aucun feeling à-propos de ça)

Merci d'avance pour votre aide =)