Thread: Converting String to Math Equation

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    39

    Converting String to Math Equation

    hi guys,

    I wonder how to convert a string to mathematical equation so that my program can make use of the string as and C++ programming language mathematical equation to perfrom mathematical operations. Thanks you in advance.

  2. #2
    *this
    Join Date
    Mar 2005
    Posts
    498
    what do you mean?

    like if someone types in 3+4 into a string, then the program seperates the numbers and the operator then does the math?

    Show us your progress.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    39
    Quote Originally Posted by JoshR
    like if someone types in 3+4 into a string, then the program seperates the numbers and the operator then does the math?
    yup like that

  4. #4
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    It depends on what operators and functions you want to support. Would you want just the four basic binary operators, or would you want "unary" operators as well, as in sin 5 and 5 !

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    39
    it should cover all the linear equation's needs operation susch as -+*/, sin, cos, tan, abs, .... etc if can whatever math functions provided by math.h

  6. #6

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  2. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  3. Custom String class gives problem with another prog.
    By I BLcK I in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2006, 03:40 AM
  4. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM