Full code had no compiling error but gave a segmentation error which I fixed by adding the loop for temp. That led to an abort trap a few lines later. I moved the offending code but the abort trap stayed at the same line were price[l] allocation is. Ideas?
Code:
float **price;
char **temp, ***vol, *date;
temp = (char **) calloc(600,sizeof(char*));
for (i = 0; i < 2000; i++)
temp[i] = (char *) calloc(40,sizeof(char));
vol = (char ***) calloc(2,sizeof(char**));
vol[0] = (char **) calloc(2000,sizeof(char*));
vol[1] = (char **) calloc(2000,sizeof(char*));
for(i = 0; i < 2000; i++)
{
vol[0][i] = (char *) calloc(10,sizeof(char));
vol[1][i] = (char *) calloc(10,sizeof(char));
}
date = (char *) calloc(12, sizeof(char));
price = (float **) calloc(2000,sizeof(float*));
for(l = 0; l < 2000; l++)
price[l] = (float*)calloc(2000,sizeof(float));