Bonjour,
j'ai un tout petit problème avec ce code:
g++ me retourne: "erreur: ';' attendu avant 'iter'
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 template<typename T> class EllipticCurve { //... std::pair<T, T> SoustractPoints(const std::pair<T, T> firstPoint, const std::pair<T, T> secondPoint) { std::pair<T, T> reciprocalPoint(firstPoint.first, 0); std::multimap<T, T>::iterator iter = m_points.begin();//ici if( iter != m_points.end()) { if((--iter).second == m_p - secondPoint.second) reciprocalPoint.second = iter.second; else { reciprocalPoint.second = m_p - secondPoint.second; } } return AddPoints(firstPoint, reciprocalPoint); } };
Je crois me souvenir qu'il fallait mettre quelquechose comme template devant... Mais je ne me souviens plus.
Si vous pouviez me dire ce que c'est je vous en serai reconnaissant.
Partager