Maybe the title doesn't fit enought.
I have two classes "Player" and "Upgrade"
- Player is declared before Upgrade.
But I need a method in the Player class that uses a pointer to the Upgrade class
If I try to compile it I get ‘Upgrade’ has not been declared. I give a sample code. Notice i can't just switch the location of both class because Upgrade has also some methods that has Pointers to Player
class Player{
string Name;
getUpgrade(Upgrade *); // It's a prototype
};
class Upgrade{
double Upgradeusec;
somePlayerData(Player *); // It's a prototype
};
PD: I have been searching for this for like 1 hour, without results.
Notice: This is just a sample code, because the real one goes large