error: no matching function for call to 'Player::setX(int&, bool&)'
in main:
//player
pc.setX(pc.x, *actions); //actions is an arr of input possibilities.
pc.setY(pc.y, *actions);
in player.h:
public:
int x = 1, y = 1;
int setY (int y, int *actions);
int setX (int x, int *actions);
secondary question: is it possible to pass x/y as a struct instead of individually?
all the code that should be necessary afaik:
bool actions[10]; //"up", "down", "left", "right", "skill1", "skill2", "skill3", "skill4", "skill5", "interact",
Player pc; //object creation
//player
pc.setX(pc.x, *actions);
pc.setY(pc.y, *actions);
#ifndef PLAYER_H
#define PLAYER_H
class Player
{
public:
int x = 1, y = 1;
int setY (int y, int *actions);
int setX (int x, int *actions);
private:
};
#endif //