- #1
Jamin2112
- 986
- 12
My Calculus tool is coming along. The only thing left is to write some it's helper functions, such as the one described below:
which uses
defined in
Does anyone have advice for how I should start out on this function? Or is there any resource you could direct me to where I could learn this type of thing?
Code:
void CalculusWizard::partitionEquation(const std::string & eq, std::string & eq1, std::string & eq2, CalcWizConsts::eqOps & oper)
{
/* Given an equation eq, partion eq into
eq = eq1 oper eq2
where oper is the operator with the lowest precedence,
e.g. eq = "x*sin(x)+x^2" --> eq1 = "x*sin(x)", oper = ADDITION, eq2 = "x^2".
If there is no operator, e.g. eq = "x", then oper = NONE.
*/
}
which uses
Code:
enum eqOps { ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, COMPOSITION, NONE };
defined in
Code:
namespace CalcWizConsts.
Does anyone have advice for how I should start out on this function? Or is there any resource you could direct me to where I could learn this type of thing?