So below here I have the base of a program which reads text from a file, extracts the words inside the parantheses, and stores it into a vector. I've been stuck at this for a while now and would really appreciate any help with it. I can get the text from the file into the vector but I'm at a loss of extracting all the words inside the parantheses into another vector.
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main() {
ifstream fin("Lab8_2data.txt");
string text;
vector<string> word;
if(fin.fail()){
cout << "Unable to read the file.";
return -1;
}
getline(fin, text);
// you need to implement from here
fin.close();
return 0;
}