Advertisement
huutho_96

Untitled

Mar 6th, 2017
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <fstream>
  4. #include <string>
  5.  
  6. using namespace std;
  7. void main()
  8. {
  9.     fstream input;
  10.     input.open("text.txt", ios::in | ios::out);
  11.     string line;
  12.     vector<string> lines;
  13.     while (getline(input, line))
  14.     {
  15.         lines.push_back(line);
  16.     }
  17.     vector<int>vec;
  18.     vector<string>::iterator v = lines.begin();
  19.  
  20.     while (v != lines.end())
  21.     {
  22.         cout << *v << endl;
  23.         v++;
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement