I need help with the syntax for the malloc function, I'm trying to write this code and everything seems to be working fine apart from one warning message. So I've written:
double *a;
double *b;
a = (double*)malloc(s);
b = (double*)malloc(s);
~~
code
~~
free(&a);
free(&b);
s is the number of points. It keeps saying "attempt to free a non heap object". Does anyone know what might be going wrong here?