newbie stl compiler error question
-
Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list
-
Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list
Ok sorry. the < should be a !=
-
Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list
You are missing a type typedef std::list SOCKLIST; where type can be int, char, string, a class, structure etc.
-
You are missing a type typedef std::list SOCKLIST; where type can be int, char, string, a class, structure etc.
The forum ate my code. Since it probably ate your code to I'm not sure if this is the correct answer to your problem. 'typedef std::list SOCKLIST;'
-
The forum ate my code. Since it probably ate your code to I'm not sure if this is the correct answer to your problem. 'typedef std::list SOCKLIST;'
Yeah the forum ate my code. The type was, let's try to do this explicitly, typedef std::list<Socket *> SOCKLIST; but I fixed the problem, so it's OK. Thanks for the feedback!