please help me soon!!!!!

I want to write a program that receive a mathematical expression including "tan","sin","cos","cot","ln","+","-","*","/","power""d_x(derivative)" and any other function that user defines it in a seperate file and calculate the result.
as far as I now I must use "token" method and for derivative of a function I must use tree_method structure.
I thanks anyone that can help me as soon as possible!
Last edited on
When you say that you "must use" those methods, is that a requirement of the assignment or are you basing this off of some other research you've done. I only ask because this is not how I would have done it.
What kind of help? This is a rather large and involved project.
If you want to check out what the inventor of C++ did you should read his "Programming Principals and Practice using C++". One of the main programs early in the book is a token based parser for making a calculator. Pretty much what you want to do in a nutshell. It covers several chapters though as it is NOT trivial!

EDIT: link to book - http://www.google.com/products/catalog?q=programming+principles+and+practice+using+c%2B%2B&oe=utf-8&rls=com.frontmotion:en-US:unofficial&client=firefox-a&um=1&ie=UTF-8&tbm=shop&cid=16228997791858743207&sa=X&ei=LD7lTaDjIMXa0QG5yoWrBw&ved=0CDEQ8wIwAQ
Last edited on
Topic archived. No new replies allowed.