To me it looks like I'm calling a private function. Am I actually doing that?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
class Movement
{
public:
void populatePossibleMoves(int actionsAvailable);
private:
void populatePossibleMoves(int actionsAvailable, Tile* currentTile);
};
class Person
{
};
void Person::populateMovements()
{
myMovement->clearPossibleMoves();
myMovement->findPossibleMoves(myActionPoints->getCurrentActionPoints(), nullptr);
}
Also:
In the header file, when I mouse over populatePossibleMoves it says
"+ 1 overload"
When I write the function call and try to use the public overload i get the error "too few arguments in function call"
I am calling it in a public function (populateMovements) in class Person. It also builds and runs without errors, which has lead to my confusion as to why/how I'm doing so without the compiler saying how in the world did you get access to a private function in a class that you are not friends with.