Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <string>
- using namespace std;
- int main()
- {
- vector<string> str;
- ifstream file("file.txt");
- int i = 0;
- string buffer;
- while (getline(file, buffer, ' ')) {
- str.push_back(buffer);
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement