Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. int OtworzPlik(vector<string>&line)
  2. {
  3. ifstream in("../test.txt");
  4. if (!in.is_open())
  5. {
  6. cout << "Blad otwarcia pliku" << endl;
  7. return 0;
  8. }
  9. string temp;
  10. while (getline(in, temp))
  11. {
  12. line.push_back(temp);
  13. }
  14. for (auto it : line)
  15. {
  16. cout << it << endl;
  17. }
  18. return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement