-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquestion.cpp
More file actions
25 lines (21 loc) · 921 Bytes
/
question.cpp
File metadata and controls
25 lines (21 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "question.h"
#include <string>
Question::Question() { }
void Question::init(int category, std::string question, std::string correct, std::string wrong1, std::string wrong2,
std::string wrong3, int qid) {
Question::category = category;
Question::question = question;
Question::correct = correct;
Question::wrong1 = wrong1;
Question::wrong2 = wrong2;
Question::wrong3 = wrong3;
Question::qid = qid;
}
Question::Question(int category, std::string question, std::string correct, std::string wrong1, std::string wrong2,
std::string wrong3) {
init(category, question, correct, wrong1, wrong2, wrong3, -1);
}
Question::Question(int category, std::string question, std::string correct, std::string wrong1, std::string wrong2,
std::string wrong3, int qid) {
init(category, question, correct, wrong1, wrong2, wrong3, qid);
}