Jump to content
  • Advertisement
Sign in to follow this  
ilavos

need some code

This topic is 5096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if anybody out there has any source code ( ms vc++ 6.0 ) that allows strings to be treated has math expressions.By that i mean a string is " evaluated" ( has some guy said) as being a math expression?? It would help me a lot.Thanks ahead.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I guess what he wants is, for instance to take in a string:

"cos(pi / 2) + 3 * sin(3 * pi / 4)"

And have it evaluated....


If that is so, then you need to give a little more details. :)

What kind of mathematica expressions do you want parsed? If it's only simple operations like +, -, *, /, then I suggest you don't bother looking around, and jus write a library yourself - it's not so hard. If you want more, like varius trig functions, roots, etc, then check out this here site: Fast mathematical expressions parser.

BTW, that above site was the first hit in the mathematical expression parser C++ Google search. I suggest that that is a good resource for such simple things. ;)

Vovan

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!