-
int xc_init() { #define int intptr_t; int poolsize; // default size of text/data/stack int *text, poolsize = 1 * 1024; if (!(text = malloc(poolsize))) //error: assigning to 'intptr_t *' (aka 'int *') from incompatible type 'void *' return -1; }
here on malloc I get - error: assigning to 'intptr_t *' (aka 'int *') from incompatible type
-
and you shouldn't use malloc() in c++ anyways.
const size_t intCount = 1000U;
int* intPtr = new int[intCount];
.
.
.
delete [] intPtr;