Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. #include <iostream>
  2. #include "Dictionary.h"
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string path;
  8.     string word;
  9.     char option;
  10.     string newword;
  11.  
  12.     Dictionary dictionary("C:\\Users\\Charley\\Desktop\\dictionary\\bigdictionary.txt"); //Call function to load dictionary words into vector
  13.  
  14.     cout<<"Welcome to Spell-Checker!"<<endl;
  15.     cout<<"Your dictionary has been created!"<<endl;
  16.     cout<<"Would you like to add a word? Type 'y' for yes and 'n' for no: ";
  17.     cin>>option;
  18.     while(option == 'y') //Keep adding words as long as the user would like
  19.     {
  20.         cout<<"Enter the word you would like to add: ";
  21.         cin>>newword;
  22.  
  23.         dictionary.addword(newword);
  24.         cin>>option;
  25.     }
  26.     cout<<"Enter a filepath to run the Spell-Checker program on: "<<endl;
  27.     cin>>path;
  28.     cout << "Who cares? Running program.";
  29.     dictionary.spellchecker("C:\\Users\\Charley\\Desktop\\dictionary\\bigdictionary.txt");
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement