String Operation

So I have this problem:

Write a C++ program that extracts words inside the parentheses from a text file and prints the
extracted words on the screen

#include <iostream>
#include <string>
using namespace std;
int main() {

string text = "//enter text here";

// you need to implement from here

return 0;
}

I have no idea where to start. How do I do this?

Read text from file into string
Look at string, one char at a time
If char is '(', every subsequent char gets printed to screen
If char is ')', every subsequent char does not get printed to screen
Topic archived. No new replies allowed.