H
hpsoar
int *pi;
int **ppi;
pi = (int*)malloc(sizeof(int));
ppi = (int**)pi;
can anyone tell me, how the code above passed compilation? and I saw
another example(http://www.parashift.com/c++-faq-lite/
dtors.html#faq-11.14):
void* ans = pool.alloc(nbytes + 4); // overallocate by 4 bytes
*(Pool**)ans = &pool;
thank you.
int **ppi;
pi = (int*)malloc(sizeof(int));
ppi = (int**)pi;
can anyone tell me, how the code above passed compilation? and I saw
another example(http://www.parashift.com/c++-faq-lite/
dtors.html#faq-11.14):
void* ans = pool.alloc(nbytes + 4); // overallocate by 4 bytes
*(Pool**)ans = &pool;
thank you.