Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

vector iterator problem in MSCV7

Started by sipickles Nov 30, 2005 at 12:48 PM 0 replies 700+ views
Original Post
sipickles
sipickles
Hello, I am getting an error with this code, but it looks good to me, similar to many online examples: std::vector g_clientList; std::vector::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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.