正在加载图片...
bool Calculator Get2Operands( double& left double& right i 栈S中取两个操作数 if(S Is Empty()=true) {cer<<“缺少右操作数!”<<endl; return false;} S Pop(right if(S Is Empty()==true) {cerr<<“缺少左操作数!”<<endl; return false;} S Pop(left) return truebool Calculator :: Get2Operands(double& left, double& right ) { //从栈S中取两个操作数 if (S.IsEmpty( ) == true) {cerr << “缺少右操作数!”<< endl; return false;} S.Pop(right); if (S.IsEmpty( ) == true) {cerr << “缺少左操作数!”<< endl; return false;} S.Pop(left); return true; } 31
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有