Is there an easy way to evaluate strings like
"(4+8)*2"
So that you’d get the int value of 24?
Or is there a lot of work needed to get this done…?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use Ncalc:
http://ncalc.codeplex.com/
Also, this question had been previously asked and has some interesting answers including Ncalc : Evaluating string "3*(4+2)" yield int 18