Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "Dictionary.h"
- using namespace std;
- int main()
- {
- string path;
- string word;
- char option;
- string newword;
- Dictionary dictionary("C:\\Users\\Cassie\\Desktop\\dictionary\\bigdictionary.txt"); //Call function to load dictionary words into vector
- cout<<"Welcome to Spell-Checker!"<<endl;
- cout<<"Your dictionary has been created!"<<endl;
- cout<<"Would you like to add a word? Type 'y' for yes and 'n' for no: ";
- cin>>option;
- while(option == 'y') //Keep adding words as long as the user would like
- {
- cout<<"Enter the word you would like to add: ";
- cin>>newword;
- dictionary.addword(newword);
- cin>>option;
- }
- cout<<"Enter a filepath to run the Spell-Checker program on: "<<endl;
- cin>>path;
- cout << "Who cares? Running program.";
- dictionary.spellchecker("C:\\Users\\Cassie\\Desktop\\dictionary\\bigdictionary.txt");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement