oh my God I am such an idiot!!! :D
thanks!
p.s. there is something else wrong. the n in Init() should be different for arrays of different lengths.
Type: Posts; User: budala
oh my God I am such an idiot!!! :D
thanks!
p.s. there is something else wrong. the n in Init() should be different for arrays of different lengths.
aaaaah I see now what you mean. I redid my Insert and now it's like this
int e = exp;
if (a[e] != NULL) a[e]->koef += koef;
else
{
monomial * new = malloc(sizeof(monom));
...
I am using malloc every time because i want to have separate arrays (polynomials) one for p, one for q, one for ip and iq (ip = integrate p), one for p+q and dp and dq (not mentioned here). I want...
Having trouble with this. Adding, derivation, integration, all work fine, but multiplication doesn't.
My polynomial is in fact an array of pointers. Maybe redundant but that's my choice. I set the...