Bonjour, j'ai la fonction suivante :
j'ai l'erreur suivante :
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 //____________________________________________________________________________________________ bool Toto::calcul(const string & loi, const map<string,vector<double> > & param,double & sortie) { if( (loi == "loi1") || (loi == "loi2") ) { vector<double> p = param[loi]; // parametres de la loi "loi" CA PLANTE ICI if(p.size() != 7) return false; sortie = p[0] + param["titi"][1]; return true; } return false; }
Savez-vous pourquoi ? Je n'en ai vraiment aucune idée...error C2678: binary '[' : no operator found which takes a left-hand operand of type 'const std::map<_Kty,_Ty>' (or there is no acceptable conversion)
Merci d'avance
Partager