server lag? i dunno but i had a whole post about postfix and my struggles with it go bye bye. bleh. its too late in the evening to coherently retype it. Basically im trying to write a SIMPLE postfix calculator that can take 2 44 2 105 + + - and give me an answer. I cant even get the beginning code (i wrote it in main cause im so frustrated i am not even gonna try functions yet) This below is just my code for trying to remove the blanks and build the numbers to put into the stack
this is probably incoherent as am i. Guess i learned to save everything before i post it hereCode:{ char ch; cout<<"Postfix Calculator \n"; cout<<"Enter a legal positive integer postfix expression: \n"; cin>>ch; while (ch != '\n') { while (ch == '\b') { cin>>ch; } if (ch >= '0' && ch <= '9') { int number = 0; while (ch != 'b') { number = (number*10) + (ch-'0'); cin>>ch; } // push into stack around here i think } }
thansk in advance if anyone can help
~R



LinkBack URL
About LinkBacks


