Archived

This topic is now archived and is closed to further replies.

Destroyer

A MSVC++ compiler error - what does it mean ?

Recommended Posts

Destroyer    122
Hi, I don''t usually run into errors where I can''t figure out what they mean and fix them. But this one is new to me and it has me stumped... error C2040: ''World'' : ''class CVectSurface *'' differs in levels of indirection from ''class std::vector >'' Any help ? Thanks, Destroyer

Share this post


Link to post
Share on other sites
Stoffel    250
  
error C2040: ''World'' : ''class CVectSurface *'' differs in levels
of indirection from ''class std::vector<class Sprite *,class
std::allocator<class Sprite *> >''

You''re trying to convert from a vector of Sprite* to a CVectSurface*, or maybe vice versa. There''s precious little else that can be said without seeing the line of code that generates the error.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Place the cursor in front of the error number and press F1.
That''ll give you some more info

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
quote:
Original post by Destroyer
Hi,

I don''t usually run into errors where I can''t figure out what they mean and fix them. But this one is new to me and it has me stumped...

error C2040: ''World'' : ''class CVectSurface *'' differs in levels of indirection from ''class std::vector<class Sprite *,class std::allocator<class Sprite *> >''

Any help ?

Thanks,

Destroyer


Here''s what I recommend you try first, declare your CVectSurface in it''s own namespace. Seems like a conflict where the compiler doesn''t know which function to call... I know it''s not clear but try it...




Share this post


Link to post
Share on other sites