Direction on implementing alegrabic functions

Hi guys, i need help in implementing an algebra function.
(a+b)(a-b)

may i know how can i do this?
does c++ support this sort of function.
Did a quick search on google and all of them suggested using libraries like boost.

is there anyway to do this without a library?
Do you want to calculate (a+b)(a-b) depending on a and b?
Or do you want to parse an arbitrary string and do operations it contains?
i want to calculate them according to a and b.
i am trying to mimick shamir`s secret sharing here =)
1
2
3
4
int foo(int a, int b)
{
    return (a + b)*(a - b);
}
Topic archived. No new replies allowed.