|
From: <his...@ya...> - 2004-03-05 10:24:04
|
hi guys, i am a newbie to dev as well as C++. now i have to read a mathematical expression from the console as a string and then do some calcultions with it. how do i go about performing calculation. the expression or eqn contains operators like +, -, / etc and also variables i.e alphabets like x,y etc.. in addition to numbers. is there some other to read the data rather than reading it into a string. or can something be done so that numerical calculations can be made. ex: read "2+3-x" should be able to output 5-x as the answer. please do help. - sriram Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. |