No, I don't have anything already written, I'm pretty sure I made that point as well. :) As far as data structures, I'd recommend grabbing a book. I bet there's a decent "Data Structures in C++" book on the shelves of your local book store, or they'd be able to point you to another store to try.
Rather than trying to come up with code that you can understand, which solves your problem, I'd prefer that you actually take a bit of a break (if you need) and learn more about programming in general ... then when you go back to reading specifically about "recursive descent parsers", it'll make more sense to you, and you'll have a much better idea how to approach the problem code-wise.
Not that it helps much now, but you can think of your equations in a hierarchical sense:
+ an equation is made up of expressions on either side of an '=' sign (*)
+ an expression is a sequence: operand, operator, operand, ..., operand.
+++ an exception to the above is the unary "negation" operator which doesn't need a preceding operand.
+ operators include +, -, *, /, ^ (others too, i bet)
+ operands can be numeric constants, variables, or other expressions (**)
(*) in fact, you can think of the entire equation as a single expression, where the "=" (along with "<", ">", etc.) is a "relational operator" -- one that returns true or false instead of a numeric answer
(**) especially useful for incorporating "()" ... "(" denotes the start of a sub-expression, which can be treated exactly like any other expression. also now that an expression can contain sub-expressions, which can in turn contain sub-sub-expressions, you can see where the "recursive" part comes in. The "descent" part comes from working your way through a branching "tree" structure of operands and operators, accumulating partial results in the correct order -- in computer science, trees are represented with the "root" at the top, and the branches growing downward, probably just because its easier to deal with on paper that way. A data structure for a point in the tree might look something like:
struct rdp_node {
bool is_operator; // tells whether the "op" or "value" is relevant
Operator op;
Value val;
struct rdp_node *left_operand;
struct rdp_node *right_operand;
};
typedef struct rdp_node RDPNode; // Now you can say something like RDPNode *ptr = new RDPNode();
I'm not defining the Operator or Value class/structure yet, the point here is simply that you can have a data structure that can "point to" other objects of the same type, in this case left and right sub-expressions, which might be other "operator nodes", or might be "value nodes".
I'm also not writing full-up tree code for you. Functions you would need, in order to make the data structure useful, include "add a node into the tree", "compute the value of this node, taking into account its sub-nodes", "print the expression represented by this tree", "get rid of this tree (and all the nodes in it)", and so on. Of particular interest is "build up a tree from the input expression/equation" which requires no small amount of thought. Try it out on paper -- how would you represent "3 + 2 * 5" using the RDPNode structure above? (Hint: try drawing one node as a box with four rows, the bottom row divided into two columns, one will start an arrow pointing down and to the left, the other will start an arrow pointing down and to the right, each to another box). What goes at the root/top of the tree? What are the "leaf nodes" (those that don't point to any sub-expressions)?)