Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Undefined symbols for architecture x86_64:
- "Question::display()", referenced from:
- _main in QuizDriver-e52a2c.o
- "Question::getKey() const", referenced from:
- _main in QuizDriver-e52a2c.o
- ld: symbol(s) not found for architecture x86_64
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
- #include <iostream>
- #include <iomanip>
- using namespace std;
- #include "Question.h"
- int main()
- {
- Question q1;
- Question q2;
- Question q3;
- Question q4;
- string q1Stem = "1. What name is given to half of a Byte (4 bits)?";
- string q1Answers [] = {"Nibble","Ort","Scrap","Snippet"}; //answer A
- string q2Stem = "2. Which country is home to the Kangaroo?";
- string q2Answers [] = {"China","India","Mexico","Australia"}; //answer D
- string q3Stem = "3. What do you use to measure an angle?";
- string q3Answers [] = {"Compass","Protractor","Ruler","T-Square"}; //ans B
- string q4Stem =
- "4. The Great Sphinx has the head of a human and the body of a what?";
- string q4Answers [] = {"Camel","Eagle","Lion","Alligator"}; //answer C
- string q5Stem =
- "5. What is the flat rubber disc used in a game of ice hockey?";
- string q5Answers [] = {"Birdie","Puck","Dart","Tile"}; //answer B
- q1.display();
- cout << endl;
- q2.display();
- cout << endl;
- q3.display();
- cout << endl;
- q4.display();
- cout << endl;
- cout << "Answers:" << endl;
- cout << q1.getKey() << " " << q2.getKey() << " " << q3.getKey() <<
- " " << q4.getKey() << endl;
- return 0;
- }
- #include <string>
- using namespace std;
- class Question
- {
- public:
- string stem;
- string answers[4];
- char key;
- void setStem(string);
- string getStem() const;
- void setAnswers(string []);
- string getAnswer(int);
- void setKey(char);
- char getKey() const;
- void display();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement