1
我的主要功能保持運行的程序,直到用戶輸入退出
int main(){
Postfix post;
char size=100;
char infix[size];
string get_input=" ";
cout<<"Input Infix";
cin>>infix;
int size=strlen(infix);
char postfix[size];
post.infix_to_postfix(infix, postfix, size);
cout<<"\nInfix Expression is:"<<" "<<infix;
cout<<"\nPostfix Expression is:"<<" "<<postfix;
cout<<endl;
程序轉換綴以與棧後綴符號。我的問題是,有沒有辦法循環直到用戶不想。 與此類似
int n;
cin>>n;
while (n!=0){
// keep doing whatever
}