So im trying to create a quiz using c++ that incorporates three different types of questions. These are the standard one answer question, true false questions and multiple choice questions.
Can anyone tell me how to create the true false and multiple choice questions?
You could have a Question class, with a question string, answer string and a dynamically sized array (vector) of strings for the answers (choices).
The Question objects could determine their own type based on the size and contents of the answers collection, and use this to determine how to interact with the student (overloaded functions, switch statement, etc).
Or you could give Question some children, each one a specific question type with an overriden (virtual) function for interacting with the student.