I've been doing a project on solving differential equations and made a working one on C++ when i was told to make it on C I used function "new" to create dynamic arrays and needed to change it to malloc, so i did :)
But i'm getting errors 255 and -1073741819 randomly
Can you please help me to find an error in my code?
double **k=(double **)malloc(7 *sizeof(double*));
for(i=0; i<7; i++) k[i]=(double *)malloc(4 *sizeof(double));
double **b=(double **)malloc(7 *sizeof(double*));
for(i=0; i<7; i++) b[i]=(double *)malloc(6 *sizeof(double));
double *mn=(double *)malloc(7 *sizeof(double));
double *yy1=(double *)malloc(4 * sizeof(double));
double *yy2=(double *)malloc(4 * sizeof(double));
int *go;
go=1;
I can't understand if am i using malloc incorrectly?
thanks for your response!