The problem is...I just want out of the loop because there are other things within the code that need to be executed...what could be another action I could put to get out of the loop?
Here's the loop:
do {
cout << "\n(X) to quit" << endl;
cout << "(L)ighten, (D)arken, (S)harpen, (B)lur or S(p)ecial Effect:";
cin >> ch;
if (ch == 'L' || ch == 'l') {
cout << "How much";
cin >> changeAmt;
myimage.lighten(changeAmt);
}
if (ch == 'D' || ch == 'd') {
cout << "How much";
cin >> changeAmt;
myimage.darken(changeAmt);
}
if (ch == 'S' || ch == 's')
myimage.sharpen();
if (ch == 'B' || ch == 'b')
myimage.blur();
if (ch == 'P' || ch == 'p')
myimage.checkers();
if (ch == 'X' || ch == 'x')
exit(0); //What can I put here to just exit the loop?
} while (ch != 'X' || ch != 'x');

New Topic/Question
Reply




MultiQuote




|