Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is my c++ quiz game that I am making. I need some assistence on how I can get these questions to start running though

This is my c++ quiz game that I am making. I need some assistence on how I can get these questions to start running though int main to ask the user the questions. Please and Thank you.

#pragma once

#include

// ------------------------------------------------------------------------------------------------------------------------------------

// Class Questions

class Questions

{

public:

char* Text;

char* Answer1;

char* Answer2;

char* Answer3;

int CorrectScore;

// Defualt Constructure

Questions(){}

// Custom Constructure

Questions(char* text, char* answer1, char* answer2, char* answer3, int correctscore) {

Text = text;

Answer1 = answer1;

Answer2 = answer2;

Answer3 = answer3;

CorrectScore = correctscore;

}

};

std::queue LoadQuestions() {

Questions q1 = Questions("How many stars are on the American flag?", "Fifty", "Fourty seven", "Twelve", 2);

Questions q2 = Questions("What state is Detroit in ?", "Flordia", "Texas", "Michigan", 1);

Questions q3 = Questions("How many points are awared in football for a touchdown ?", "Six", "Seven", "Eight", 4);

std::queue questions;

questions.push(q1);

questions.push(q2);

questions.push(q3);

return questions;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

Students also viewed these Programming questions

Question

How does Google systolic array speed up the matrix multiplication?

Answered: 1 week ago