All pastes #222608 Raw Edit

Something

public text v1 · immutable
#222608 ·published 2006-10-26 12:58 UTC
rendered paste body
bool Calculator::oper(char op){
	myComplex hold;
	if (pop(hold)){
		if (!mPtop){
			push(hold);
		}
		else{
            if (op == '/'){
				if (!hold.re && !hold.im){
                    double temp = (*mPtop).re
	ERROR 1&2				(*mPtop).re =((*mPtop).re * hold.re + (*mPtop).im * hold.im)/(hold.re * hold.re + hold.im * hold.im);
					(*mPtop).im = (temp * (-hold.im) + (*mPtop).im * hold.re)/(hold.re * hold.re + hold.im * hold.im);
                    return true;
				}
			}
            if (op == '*'){
                double temp = (*mPtop).re
	ERROR 3&4			(*mPtop).re = (*mPtop).re*hold.re - (*mPtop).im * hold.im;
                (*mPtop).im = temp*hold.im + (*mPtop).im * hold.re;
				return true;
                }
            if (op == '+'){
                (*mPtop).re = (*mPtop).re+hold.re;
                (*mPtop).im = (*mPtop).im+hold.im;
				return true;
                }
            if (op == '-'){
                (*mPtop).re = (*mPtop).re-hold.re;
                (*mPtop).im = (*mPtop).im-hold.im;
				return true;
                }
            }
	}
	return false;
}


ERROR 1term does not evaluate to a function taking 1 arguments
ERROR 2left of '.re' must have class/struct/union type

ERROR 3term does not evaluate to a function taking 1 arguments
ERROR 4left of '.re' must have class/struct/union type