Bonjour,
Je cherche à faire un petit histogramme: voici le code
p1 et les autres initialisés à 0. Mais j'ai un problème au moment de la compilation
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 if (hypotenuse1>0) { if (angle1>=0 && angle1<90) p1++; if (angle1>=90 && angle1<180) p2++; if (angle1>= -90 && angle1<0) p4++; if (angle1>= -180 && angle1<-90) p3++; }
je comprend pas pourquoi il m'affiche ces erreurs
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 main.cpp||In function `int main()':| main.cpp|223|error: no `operator++(int)' declared for postfix `++', trying prefix operator instead| main.cpp|223|error: no match for 'operator++' in '++p1'| main.cpp|225|error: no `operator++(int)' declared for postfix `++', trying prefix operator instead| main.cpp|225|error: no match for 'operator++' in '++p2'|
Merci d'avance
Partager