开发者

Help with Compiler Error C2440 in C++ [closed]

开发者 https://www.devze.com 2023-03-07 16:41 出处:网络
开发者_如何学C It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

i am getting a C2440 compiler error when i build my program but cant figure out how to fix it

Here is the line it comes up on:

if((*Iter)->classID != classID && (*Iter)->getX() == (int)pos.x && (int)(*Iter)->getY == (int)pos.y)

PLEASE HELP!!!


Looks like you're missing () in your getY call:

(int)(*Iter)->getY should probably be (int)(*Iter)->getY()


I guess its this part(*Iter)->getX() == (int)pos.x and perhaps it needs to be (int)(*Iter)->getX() == (int)pos.x. This is just a shot in the dark based on the (int)(*Iter)->getY == (int)pos.ypart of the expression. More code/context would be really helpful though. And as Demian Brecht pointed out, perhaps the () is missing on this part of the expression as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消