Advertisement
omone

Untitled

Mar 5th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. void zadanie4()
  2. {
  3. string s;
  4. vector<list<string>> TABL;
  5. TABL.resize(10);
  6.  
  7. fstream input("slowa.txt", ios::in);
  8. if (input.good())
  9. {
  10. while (!input.eof())
  11. {
  12. input >> s;
  13. cout << s << endl;
  14. TABL[s.size()].push_back(s);
  15. }
  16. }
  17. srand(time(NULL));
  18. int z;
  19. z = rand() % 10;
  20. while (!TABL[z].empty())
  21. {
  22. TABL[z].sort();
  23. z = rand() % 10;
  24. //cout << TABL[z]; nie dziaล‚a
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement