Hi @all
I have an if statement in my prog. I want my program ends if my if statement returns false.
In order to end my prog. I used break but g++ compiler says I should put them in a loop or switch statement.
for example, can I write a statement like without putting them in a loop;
thanksCode:if (isalpha(chr1) cout <<ch1<<" is a char "<<endl; else { cout <<ch1<<" is not a char "<<" quitting. "<<endl; break; }