Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string filename = "file.dat";
- fstream infile(filename);
- string line;
- while (getline(infile, line)) {
- string item;
- stringstream ss(line);
- vector<string> splittedString;
- while (getline(ss, item, '|')) {
- splittedString.push_back(item);
- }
- int a = stoi(splittedString[0]);
- // I do some processing like this before some manipulation and calculations with the data
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement