I am trying to reallocate memory to my table using the below expression.But I always keep getting the below error.Please kindly advise me.
typedef char *OFAttribs[6];
OFAttribs *tmp = realloc(pTable, sizeof(*tmp) * (nTableLen+1));
Error: invalid conversion from âvoid*â to âchar* (*)[6]â
Try this:
OFAttribs *tmp = (OFAttribs*) realloc(pTable, sizeof(*tmp) * (nTableLen+1));