My code was working fine until I reloaded the program a few hours later. Now I get these this error:
error C3867: \'player::getxPos\': function call miss
shotVector[eS-1].initShot(P->getxPos, P->getyPos);
- you are trying to call the getxPos()
and getyPos()
members without ()
.
Use getxPos()
and getyPos()
.
shotVector[eS-1].initShot(P->getxPos(), P->getyPos());
You forgot the parenthesis, which tell the compiler that you want a method call:
P->getxPos
vs
P->getxPos()
If you instead used &P->getxPos
, that would give you a pointer to the member function itself.