终究错在哪里了?
int getsth(FILE* & filein, int &obj1, char &obj2){ //返回值:0~eof 1~数字 2~运算符 if(fscanf(filein,"%d",&obj1) == 1) return 1; if(fscanf(filein,"%c",&obj2) == 1) { if(obj2 == ' ') { return getsth(filein, obj1, obj2); } else return 2; }}//调用如下:operators.push('\n'); //堆栈state = getsth(filein, num, ch);while(state == 1 ||(state == 2 && ch != '\n') || operators.top() != '\n'){ if(state == 1) { operands.push(num); state = getsth(filein, num, ch); } else //