Question: Which statement generates an error? Why? class Player { public: void SetName ( string newName ) { . . . } void SetAge ( int
Which statement generates an error? Why?
class Player public: void SetNamestring newName void SetAgeint newAge; class SoccerPlayer: public Player public: void SetDetailsstring newName string GetLeague; int main String leagueName; Player newPlayer; SoccerPlayer newSoccerPlayer; newSoccerPlayer.SetNameTim Murphy"; newSoccerPlayer.SetAge; leagueName newPlayer.GetLeague; return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
