You declare Bow one and two as member variables of Test. Then in the constructor of Test you redeclare Bow one and two. Here you are declaring two new variables which will last for the scope of the constructor.
Initialise your variables in the initialiser list as follows:
Code:Test::Test(int lrounds): one("red"), two("blue") { rounds = lrounds; redScore = 0; blueScore = 0; }




Reply With Quote