Thread: Algebraic equation parsing/evaluation

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    1

    Unhappy Algebraic equation parsing/evaluation

    I've been loathe to ask for help with my little project literally for months, not wanting to bother anyone with my little problems. Unfortunately, my project, and the problems it has, only got larger over time. Basically, I wanted to learn C, and jumped right into writing what will eventually be a soft synthesizer. AAs a result, I understand many C concepts, basic to intermediate, but lack my important fundamental underpinnings--bad situation.

    I'm distributing the resulting abomination of weeks of work of failing miserably at learning anything new in the hopes that somebody would be willing to glance at it and point out anything that will help. Design flaws, heuristics, more efficient implementations, better ways to solve problems, actualy CORRECT ways of doing things rather than what I think might be right... Whatever. I need help in every area and any bit of information anyone can give me on my terrible code will be infinitely beneficial. I'm more of an example learner.

    Some quick meager details: Despite the time spent on this program, there's relatively little code. I've wasted much time and effort on it-- hopefully it's not truly waste. What I have so far is a window with a command button and a text window. As of right now, all it needs to do correctly is evaluate an algebraic expression like "2+2," "5 ^ (3 + 2) / 7.5," or "sin(pi *5)". I've had it successfully evaluate these expressions back when I had this in console form, although that was a horrible mish mash with bad memory management that would only work in one straight run. Since I moved to windows I've had bad luck. It wouldn't return evaluation values correctly for a while. Eventually I rearranged some stuff and it at least did that once more. It still crashes a lot though; I'm really in the dark on memory management and allocation and passing data and pointers between functions and modifying the associated data, etc. I built this against win98 and xp with mingw 3.3.1 most recently. It uses a console window for "debug" info. I doubt anyone that can help will need to even think about building this, since my errors are likely glaring and obvious. (And if it doesn't even build for you regardless, sorry, I just suck like that.)

    I apologize for distributing this mess in its current form, I'm too frustrated and let down at this point to clean it up much. Also, disclaimer: I would recommend that no one even bother with this really. I feel terrible wishing this pain in the ass on anyone.
    Last edited by ignewbiant; 11-20-2004 at 04:54 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help needed! Finding Root of an Equation?
    By reader in forum C Programming
    Replies: 4
    Last Post: 06-13-2008, 10:10 AM
  2. Replies: 15
    Last Post: 11-04-2006, 04:06 AM
  3. IDEA: Equation solver
    By Magos in forum Contests Board
    Replies: 2
    Last Post: 01-07-2003, 11:46 AM
  4. Quadratic Equation Program
    By Ambizzy in forum C Programming
    Replies: 4
    Last Post: 02-19-2002, 09:21 PM
  5. equation solving
    By ajlott_coder in forum C Programming
    Replies: 6
    Last Post: 01-26-2002, 02:34 AM