Currently, my code takes in a string from a user, checks if the paranthesis are ballanced (as defined by my class) and also returns the variable from my line (also from my class). All I need help with at this point is that I'd like to change this code to read in strings from a text file (each line is a string), print out the line, if the parenthese are balanced (true or false), and then the variables. I want it to quit when there are no more lines to read.
int main(){
string s;
cout<<"Enter strings(q to quit):\n";
while(getline(cin,s)){
if(s=="q" || s=="Q")
break;
if(checkBalancedParentheses(s)){
cout<<"Parentheses balanced.\n";
}else{
cout<<"Parentheses not balanced.\n";
}
cout<<"Proccesed string: "<
}
return 0;
}