Jump to content
  • Advertisement
Sign in to follow this  
sipickles

vector iterator problem in MSCV7

This topic is 4864 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I am getting an error with this code, but it looks good to me, similar to many online examples: std::vector<cPlayer> g_clientList; std::vector<cPlayer>::iterator iterClient; for( iterClient = g_clientList.begin(); g_clientList.end(); ++iterClient ) { //do stuff } Heres the error: error C2451: conditional expression of type 'std::vector<_Ty>::iterator' is illegal with [ _Ty=cPlayer ] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Strange because both vector list and iterator are of the type cPlayer. Thanks Simon

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!