C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[debutant] iterator

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
Bruno Causse
Guest





PostPosted: Mon Aug 29, 2005 8:53 pm    Post subject: [debutant] iterator Reply with quote



bonsoir, j'ai telecharge un kit de connection a un serveur.

cela doit etre une ancienne version. (ex strstream que j'ai changer en
sstream).

mais je bute sur deux messages d'erreur.

..../...
void ggsstream::BaseOsMatch(const CMsgOsMatch* pmsg) {
idToMatch.clear();
const COsMatch* i;

for (i=pmsg->matches.begin(); i!=pmsg->matches.end(); i++)
idToMatch[i->idm]=*i;
}
..../...

avec


class CMsgOsMatch: public CMsgOs {
public:
virtual void Handle();
void In(istream& is);

int n1, n2;
vector<COsMatch> matches;
};


les deux messages sont

error: cannot convert '__gnu_cxx::__normal_iterator<const COsMatch*,
std::vector >' to 'const COsMatch*'
in assignment

et

error: no match for 'operator!=' in 'i != pmsg->CMsgOsMatch::matches.
std::vector<_Tp, _Alloc>::end [with _Tp = COsMatch, _Alloc =
std::allocator<COsMatch>]()'




Bruno Causse
http://perso.wanadoo.fr/othello
Back to top
Bruno Causse
Guest





PostPosted: Mon Aug 29, 2005 10:02 pm    Post subject: Re: [debutant] iterator Reply with quote



Bruno Causse <pasde.bcausse.spam (AT) wanadoo (DOT) fr> wrote:

Quote:
bonsoir, j'ai telecharge un kit de connection a un serveur.

cela doit etre une ancienne version. (ex strstream que j'ai changer en
sstream).

mais je bute sur deux messages d'erreur.

.../...
void ggsstream::BaseOsMatch(const CMsgOsMatch* pmsg) {
idToMatch.clear();
const COsMatch* i;

vector<COsMatch>::const_iterator i;

un peu de recherche ne fait pas de mal.

Quote:

for (i=pmsg->matches.begin(); i!=pmsg->matches.end(); i++)
idToMatch[i->idm]=*i;
}
.../...

avec


class CMsgOsMatch: public CMsgOs {
public:
virtual void Handle();
void In(istream& is);

int n1, n2;
vector<COsMatch> matches;
};


les deux messages sont

error: cannot convert '__gnu_cxx::__normal_iterator<const COsMatch*,
std::vector >' to 'const COsMatch*'
in assignment

et

error: no match for 'operator!=' in 'i != pmsg->CMsgOsMatch::matches.
std::vector<_Tp, _Alloc>::end [with _Tp = COsMatch, _Alloc =
std::allocator<COsMatch>]()'




Bruno Causse
http://perso.wanadoo.fr/othello


--
Bruno Causse
http://perso.wanadoo.fr/othello

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.