rebonjour,

j'ai declaré un vecteur d'objet article

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 vector <Article> Vart;
 
 
Article * ar=new Article();
                    long int identifiant=strtol(tab_ligne[0],NULL,10);
                    art.setIdentifiant((long int)tab_ligne[0]);
                     double prix=atof(tab_ligne[1]);
                    art.setPrix(prix);
                    const char * libelle;
                    libelle=new char[tab_ligne[3].size()+1];
                    ar->setLibelle("aaaa");
                    // ajouter l'objet article art à la fin
            Vart.push_back(ar);
lors de la derniere instruction il affiche une erreur

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
153 C:\Documents and Settings\pc\Bureau\Mts System\article.cpp no matching function for call to `std::vector<Article, std::allocator<Article> >::push_back(Article*&)' 
 note C:\Dev-Cpp\include\c++\3.4.2\bits\stl_vector.h:557 candidates are: void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = Article, _Alloc = std::allocator<Article>]
pouvez m'aider pour resoudre ce probleme ?? merci