Just add one line of code after the cout
statement as follow:
if (mode == TOPIG) {
cout << "TOPIG MODE" << endl;
while (cin.good()){
getline(cin, lines);
while (!looking) {
spot = lines.find(" ");
if (spot == -1){
looking = true;
spot = lines.length( );
}
line = lines.substr(0, spot);
TP1stLetter(line);
if (!looking)
lines = lines.substr(spot + 1, lines.length( ) - spot + 1);
}
cout << endl;
looking = false;
//while( cin.good() ) {
//getline (cin, line);
//for(x = 0; x < line.size(); x++) {
//char letter = line[x];
//if (letter == 'a' || letter == 'e' || letter == 'i'
// || letter == 'o' || letter == 'u'){
//cout << letter;
//}
//}
}
}
0
solved Program doesn’t continue loop [closed]