Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int MAX_NUM_WORDS=2000;
- const int MAX_WORD_LEN=50;
- class Dictionary
- {
- public:
- Dictionary(const char dictFileName[]);
- void translate(char out_s[], const char s[]);
- void translate2(char out_s[], const char s[]); // s represents a word
- // out_s, the translated word
- // Here will go the function to break lines down into single words then it will be passed
- // below so it can be compared to the the array dictionaries and hence translated.
- private:
- char englishWord[MAX_NUM_WORDS][MAX_WORD_LEN];// 8 word length
- char elvishWord[MAX_NUM_WORDS][MAX_WORD_LEN];
- int numEntries;
- };
- class Translator
- {
- public:
- Translator(const char s[]);
- void toElvish(char out_s[], const char s[]);
- void toEnglish(char out_s[], const char s[]);
- private:
- Dictionary dict;
- };
Advertisement
Add Comment
Please, Sign In to add comment