Icarius44
Messages postés
51
Date d'inscription
dimanche 29 mai 2005
Statut
Membre
Dernière intervention
16 mars 2009
1
7 déc. 2005 à 23:50
Petit problème lol voici la question :
Bonjours tous, j'ai un truc bizard avec un vector : je fais un vector d'objet "Application", mais au moment d'utiliser des méthodes de cette classe il m'affiche un erreur :
error C2662: 'nom' : cannot convert 'this' pointer from 'const class Application' to 'class Application &'
voici mon code :
void afficheTout(const vector & tabCmd)
{
cout<<"Ligne de commande :"<<endl;
for (int i=0; i<tabCmd.size();i++)
{
tabCmd[i].Affiche();
}
}
comble de la bizarerie : en enlevant le const ca marche
void afficheTout(vector & tabCmd)
{
cout<<"Ligne de commande :"<<endl;
for (int i=0; i<tabCmd.size();i++)
{
tabCmd[i].Affiche();
}
}
quelqu'un a une idée?