I'm attempting to write a program for a trivia game, but failing miserably. It's supposed to be a two player game, with player one answering questions 1-10 first and then player two answering the questions and the score being stored/displayed at the end. Honestly I'd just be happy if I could get help with the program returning what the correct answer is (which it's not).
Hey, if you look at it your correctnum its never initialized anywhere. So you just getting some random number when you call the answer.getCorrect()
There are never actually anything called to initialize data members of question answer using setQues or setCorrect so all your string data members are initialized to default value ("" - empty string) and int has undefined value