Hey, I've got two classes, a sprite class and a player class. I'm trying to pass in the Sprite class to use in the player class. For example, I have Sprite Player which is a sprite, and in the player class I want to say Player.x = 5. The player class doesnt know what Player.x is so I used this:
1 2 3 4 5 6 7
class player
{
//class stuff
void move(SpriteClass & val)
{
val.x = 3;
}
I'm getting errors with this though. Overloaded member function not found in 'player"
'void player::move(SpriteClass &)': overloaded member function not found in 'Player'
In the beginning you have "player" all in lowercase, and at the end you have it capitalized. That could have something to do with it, but it's impossible to be sure unless you post some more code.