Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <map>
  4.  
  5. using namespace std;
  6.  
  7. istream findParagraph(istream& is, string& word) {
  8.  
  9. cout << "<br>" << endl;
  10.  
  11.  
  12. }
  13.  
  14. int main(int argc, char* argv[]) {
  15. argv[1] = "The Republic, by Plato.txt";
  16. ifstream infile(argv[1]);
  17. char ch = 0;
  18.  
  19.  
  20. ofstream out("title.html");
  21. out << "<html>" << endl
  22. << "<head>" << endl
  23. << "<title>" << argv[1] << "</title>" << endl
  24. << "</head>" << endl
  25. << "<body>" << endl;
  26.  
  27. typedef map<string, unsigned> dictionary_type;
  28. dictionary_type words;
  29.  
  30. string word;
  31. while (findParagraph(infile, word))
  32. ++words[word];
  33.  
  34. out << "</body>" << endl << "</html>";
  35.  
  36. } //end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement