Is it better to use a constructor initialisation list
FBullCowGame::FBullCowGame(): MyCurrentTry(1), MyMaxTries(5) {
//MyCurrentTry = 1;
//MyMaxTries = 5;
}
Rather than initialise in body of constructor?
Is it better to use a constructor initialisation list
FBullCowGame::FBullCowGame(): MyCurrentTry(1), MyMaxTries(5) {
//MyCurrentTry = 1;
//MyMaxTries = 5;
}
Rather than initialise in body of constructor?
Should be just preference of style, don’t believe there’s a difference.