Ok I'm on the last page of my book and theres one small little problem I have been stuck on for about 20 minutes. I typed the code exactly how it says and in part of the code it does this:
Code:
int *arr;
arr = calloc(5, sizeof(int));
/* some code here...... etc... */
/* then it gets to this */
arr = realloc(8, sizeof(int));
That last line is causing a compiler error that states:
Warning: passing arg 1 of 'realloc' makes pointer from integer without a cast
Yes, my program includes the proper <stdlib.h> library. No, I did not change the arr pointer type since the beginning. I don't quite understand how to fix this and what it is saying. Assistance would be appreciated. Thanks.