davemx_5

Untitled

May 17th, 2013
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1.  
  2.  
  3.  
  4. const int MAX_NUM_WORDS=2000;
  5. const int MAX_WORD_LEN=50;
  6.  
  7.  
  8.  
  9. class Dictionary
  10. {
  11. public:
  12. Dictionary(const char dictFileName[]);
  13. void translate(char out_s[], const char s[]);
  14. void translate2(char out_s[], const char s[]); // s represents a word
  15. // out_s, the translated word
  16. // Here will go the function to break lines down into single words then it will be passed
  17. // below so it can be compared to the the array dictionaries and hence translated.
  18.  
  19. private:
  20. char englishWord[MAX_NUM_WORDS][MAX_WORD_LEN];// 8 word length
  21. char elvishWord[MAX_NUM_WORDS][MAX_WORD_LEN];
  22. int numEntries;
  23. };
  24.  
  25.  
  26.  
  27.  
  28.  
  29. class Translator
  30. {
  31. public:
  32. Translator(const char s[]);
  33. void toElvish(char out_s[], const char s[]);
  34. void toEnglish(char out_s[], const char s[]);
  35.  
  36. private:
  37. Dictionary dict;
  38.  
  39. };
Advertisement
Add Comment
Please, Sign In to add comment