My code worked fine until I reloaded the program after a few hours. Now I get this error:
error C3867: 'player :: getxPos': list of calls to missing arguments; use '& player :: getxPos' to create a pointer to a member
error C3867: 'player :: getyPos': list of calls to missing arguments; use '& player :: getyPos' to create a pointer to an element
This is the code in question:
if (P->shoot())
{
shotVector.push_back(shot());
eS = shotVector.size();
shotVector[eS-1].initShot(
P->getxPos,
P->getyPos
);
}
I am trying to call two functions from a class called player, and these two functions look like this:
int player::getxPos(){
return xPos;
};
int player::getyPos(){
return yPos;
};
What is being done is that I try to ask the position of the players, and then use this to decide what to shoot with.