Skip to content

Instantly share code, notes, and snippets.

@yifeiyin
Created May 3, 2017 19:28
Show Gist options
  • Save yifeiyin/c4f77a62a894dfc4b0c766085f31c139 to your computer and use it in GitHub Desktop.
Save yifeiyin/c4f77a62a894dfc4b0c766085f31c139 to your computer and use it in GitHub Desktop.
Flashcards
#include <string>
Class Card
{
private:
string word;
string hint;
string * tags;
public:
Card(string _word, string _hint = "", string * _tags = nullptr);
~Card();
string GetWord();
string GetHint();
}
#include <string>
Class Pile
{
private:
string name;
int length;
Card * cards;
string notes;
public:
Pile();
~Pile();
string & GetName();
int & GetLength();
Card & GetCard(int index);
string & Notes();
bool isEmpty();
int isExist(string _word);
int isExist(Card & _card);
bool Add(Card _card);
bool Delete(Card & _card);
bool Delete(string _word);
void ClearAll();
void Sort();
void Shuffle(int seed = 0);
bool Save(string fileName = "untitled.txt");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment