high scores...

Basically i've got a variable in a class called score which is keeping the score of my game.

I am making a screen at the end of my game that displays the final score the player ahceived. As when the player dies the score variable is reset to 0 i need another variable called highscore which i have put inside its own class.

However the problem is that i dont know how to make my high_score variable hold the score variables data and stop it from resetting to 0 so i can display the final score on screen.


Player class, holds the score variable
1
2
3
4
5
6
Submarine_player::Submarine_player()
{
	 lives= 3;
	 energy= 100;
	 score=0;
}


final score class, holds the final_score variable

1
2
3
4
5
6
7
8
scorescreen::scorescreen()
{
	 int final_Score == Submarine_player::score;
}
scorescreen::~scorescreen()
{
}


the way i have done it at the moment brings up errors.

As usual any help is much appreciated =)
Neither do I unless you provide a more complete program that demonstrates the problem.
Topic archived. No new replies allowed.