Bonsoir , j'ai un petit souci à propos de mon code.
Le voila :
fichier Ligne.h
1 2 3
| class Ligne : public map<string,Cellule>{
public :
...}; |
fichier Feuille.h
class Feuille : public map<string,Ligne>
fichier Feuille.cpp
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
|
bool ModiferCellule(string e,string m){
double valeur;
bool trouve=false;
Feuille::iterator it1;
for( it1 = begin(); it1 != end(); it1++){
if(it1->first==e){
Ligne& l = it1->second;
Ligne::iterator it2;
for(it2=begin();it2!=end();it2++){
if(it2->first==m){
Cellule &c =it2->second;
c.SetValeur(valeur);
trouve = true;
}
}
}
}
return trouve;
} |
dans le main j'ai :
1 2 3 4 5 6
| string tab_eleves[] = {"DUPOND","DURANT", "DUBOIS"};
string tab_matieres[] = {"MATHS","PHYSIQUE", "CHIMIE", "INFORMATIQUE"};
vector<string> v_e( tab_eleves, tab_eleves+3);
vector<string> v_m( tab_matieres, tab_matieres+4);
Feuille f2(v_e, v_m);
f2.ModifierCellule("DUPOND","PHYSIQUE"); |
S'il vous plait j'ai une erreur à propos de ce code c'est dans cette ligne : for( it1 = begin(); it1 != end(); it1++)
il m'annonce que begin est undeclared
Que faut il fair s'il vous plait, Quelqu'un peut il me corriger mon erreur ?
Merci ^^
Partager