evaluating strings

This is a discussion on evaluating strings within the C Programming forums, part of the General Programming Boards category; I'm want to read an equation stored in a text file and then evaluate it. Is there a function that ...

  1. #1
    tdean
    Guest

    Question evaluating strings

    I'm want to read an equation stored in a text file and then evaluate it. Is there a function that exists that will evaluate a string and return a numerical value?

    Thanks


    Trevor

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807

    What you mean evaluate?

    What yo mean evaluate? can't understand your question.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    tdean probably has a file with something stored like this:

    2 + 2

    And then wants a function to read it and evaluate it to 4.

    Answer: No there is no such function, you need to write it yourself.

  4. #4
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Just like shiro said, you'll need to make your own one.
    Hmm, shouldn't be so difficult, try creating, and if you get in troubles, ask.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 03:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 08:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 07:37 AM
  4. Evaluating strings
    By whitel1977 in forum C Programming
    Replies: 10
    Last Post: 11-23-2002, 07:21 PM
  5. evaluating strings
    By steve8820 in forum C Programming
    Replies: 1
    Last Post: 02-21-2002, 02:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21