#ifndef QUESTION
#define QUESTION
#include <cstdlib>
#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <iomanip>
#include <termios.h>
namespace Questions{
class Question{
public:
Question(std::string q, std::string a): quest(q), answer(a){
quest.resize(4096);
answer.resize(4096);
}
Question(){
quest.resize(4096);
answer.resize(4096);
}
Question(Question const ©){
this->quest = copy.quest;
this->response = copy.response;
this->answer = copy.answer;
quest.resize(4096);
answer.resize(4096);
}
std::string quest;
std::string response;
std::string answer;
private:
};
class Deck{
public:
std::vector<Question> deck;
Deck() : pos(0), size(0) {
std::string home = std::getenv("HOME");
database = home + "/quiz.db";
deck.resize(25);
}
void get_stack();
Question get_question();
void give_quiz(std::istream &in = std::cin, std::ostream &os = std::cout);
void add_questions(Question &enter);
void add_database();
void fresh_deck();
void shuffle();
void fill_deck();
Question create_question(std::ostream &os = std::cout, std::istream &in = std::cin );
int pos;
private:
int size;
std::string database;
};
void menu(std::ostream &os = std::cout);
int selection(Deck&, std::ostream &os = std::cout, std::istream &in = std::cin);
}
#endif