Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. #include<fstream>
  4. #include<vector>
  5. #include<string>
  6. using namespace std;
  7. bool extraction(char *file, string &bla)
  8. {
  9. fstream x;
  10. x.open(file);
  11. getline( x,bla);
  12. x.close();
  13. return true;
  14.  
  15. }
  16. bool manipulation(vector <string> &p, string mystr)
  17. {
  18. char *v;
  19. v=strtok(strdup(mystr.c_str()), ".?!");
  20. while (v != NULL)
  21. {
  22. p.push_back(v);
  23. v = strtok(NULL, ".!?");
  24. }
  25. }
  26.  
  27. int main()
  28. {
  29. string y;
  30. extraction("lipsa_cafea.txt", y);
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement