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
}