Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string s; // reading in file strings
- int j = 0;
- if (!input.is_open()) {
- cout << "did not open.";
- }
- else {
- while (getline(input, s)) {
- for (int i = 0; i < s.size(); ++i) {
- i = s.find("{", i);
- j = s.find("},", j + 1);
- cout << s.substr(i, j - i + 1) << endl;
- //myArray[i] = s.substr(i, j - i + 1);
- /*if (s.at(i) != ' ')
- s2 += s.at(i);
- cout << s2;
- //myArray[i] = s2;*/
- } // end for
- } // end while
- //cout << myArray[0] << endl;
- //cout << myArray[1] << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement