Question: Using c++ Create 2 classes: player and question. In your Source.cpp file, create a trivia game for multiple players. Create 10 Question objects (You can

Using c++
Create 2 classes: player and question.
In your Source.cpp file, create a trivia game for multiple players. Create 10 Question objects (You can come up with your own trivia questions). Each question should have 4 possible answers, with only one being correct. At the beginning of the game, ask the user how many players are playing. Create as many Player objects as are requested.
Then, ask each player 5 of the 10 questions. i.e. ask player 1 the first question, then ask player 2 the first question, etc.
Do not tell the players which questions they got right or wrong until the end of the game.
Inside each Player object, create two vectors that contain pointers to Question objects. One vector contains pointers to the questions the player got right and one contains pointers to the questions the player got wrong.
At the end of the game, print out which players got each question right. Allow the user to play again, asking 5 different questions this time. Re-use the same Player objects, but make sure to clear the necessary data.

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!