-
Notifications
You must be signed in to change notification settings - Fork 0
/
FlashCards.h
35 lines (33 loc) · 885 Bytes
/
FlashCards.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
#include <iostream>
#include <string>
using namespace std;
class Node{
public:
// The data of the string
string m_data;
Node *m_next;
// since it's a doubly linked list, you need a pointer for the previous data
Node *m_previous;
};
class FlashCards{
friend class Node;
public:
FlashCards();
// destructor
~FlashCards();
//prints out the cards
void printOutCards();
// insert the cards
void insertCards(string data);
// remove the card
void removeCard(int index);
// returns the node based on the index given
Node* returnNode(int index);
Node* printOne(string choice, Node* temp);
//essentially the destructor
void clear();
// member variables
int numCards;
Node *m_head;
Node *m_tail;
};