Question: EXERCISES 1. Improve the Lobby class from the Game Lobby program by writing a friend fun of the Player class that allows a Player object

 EXERCISES 1. Improve the Lobby class from the Game Lobby program

EXERCISES 1. Improve the Lobby class from the Game Lobby program by writing a friend fun of the Player class that allows a Player object to be sent to cout. Next, update the function that allows a Lobby object to be sent to cout so that it uses your new fun for sending a Player object to cout. 2. The Lobby: : AddPlayer) member function from the Game Lobby program is inefficient because it iterates through all of the player nodes to add a new player to the end of the line. Add an m_pTail pointer data member to the Lobby class that always points to the last player node in the line and use it to more efficiently add a player. 3. What's wrong with the following code? #1 nclude using namespace std; int main() int* pScore- new int; *pScore- 500; pScore - new int (1000); delete pScore; pScore 0; return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!