This warning keeps popping up...
box.c(50) : warning C4047: '=' : 'box *' differs in levels of indirection from 'size_t'
49 pBox = malloc(sizeof(b ox)*lineCount-1);
50 assert(pBox = (sizeof(box)*li neCount-1));
typedef struct
{
double width;
double length;
double height;
double weight;
double volume;
char contents[32];
} box;
box box1[10] = {0};
box* pBox = box1;
here is my declaration and the problem with the allocation. I needed to read in from a file assign the text to an array of structs and dynamically allocate memory for the array.
box.c(50) : warning C4047: '=' : 'box *' differs in levels of indirection from 'size_t'
49 pBox = malloc(sizeof(b ox)*lineCount-1);
50 assert(pBox = (sizeof(box)*li neCount-1));
typedef struct
{
double width;
double length;
double height;
double weight;
double volume;
char contents[32];
} box;
box box1[10] = {0};
box* pBox = box1;
here is my declaration and the problem with the allocation. I needed to read in from a file assign the text to an array of structs and dynamically allocate memory for the array.
Comment