I am having problems iterating through the sequence of objects stored in my
std::map I want to call a function from the "value" object in the map. Here
is my snippet:
typedef std::map<SOCKET , Player> PLAYERMAP_SOCKE T;
.....
BOOL Player::Send(st d::string data)
......
// Send the text to all clients
PLAYERMAP_SOCKE T::iterator it;
for(it = players_by_sock et.begin(); it!= players_by_sock et.end(); ++it)
*it.Send(std::s tring(textbuff) );
.......
error C2039: 'Send' : is not a member of 'pair<unsigned int const ,class
Player>'
how do I call the function from the "pair"?
Thanx,
Christopher
std::map I want to call a function from the "value" object in the map. Here
is my snippet:
typedef std::map<SOCKET , Player> PLAYERMAP_SOCKE T;
.....
BOOL Player::Send(st d::string data)
......
// Send the text to all clients
PLAYERMAP_SOCKE T::iterator it;
for(it = players_by_sock et.begin(); it!= players_by_sock et.end(); ++it)
*it.Send(std::s tring(textbuff) );
.......
error C2039: 'Send' : is not a member of 'pair<unsigned int const ,class
Player>'
how do I call the function from the "pair"?
Thanx,
Christopher
Comment