-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuotes.h
40 lines (32 loc) · 918 Bytes
/
Quotes.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef DISCRETE_PROJ3_QUOTES_H
#define DISCRETE_PROJ3_QUOTES_H
#endif //DISCRETE_PROJ3_QUOTES_H
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include "HashMap.h"
#include "RedBlackTree.h"
#pragma once
using namespace std;
class Quotes {
struct Quote {
string quote;
string author;
string tags;
};
vector<Quote> quotes;
//map of map<string, vector<string>> to sort by <category, vector<quote, author>>
public:
map<string, vector<pair<string, string>>> categories;
Quotes();
void readFile(const string& filename);
void printQuotes();
void startGame(); //that calls printWelcomeBoard
//function to use the data structures and sort the quotes into categories
void removeQuotesfromQuotes();
void getFirstTagHashmap(HashMap &map);
void getFirstTagTree(RedBlackTree& map);
};