In an application, I have a problem like this.
The method was designed to provide an generic interface for the user to get memory from a global memory pool, implemented like:
shmPool shm;
void getMemory(void* mPtr){
mPtr = &shm;
}
but it is clear that the value of mPtr is not changed. How is it possible to align the value of a pointer to a unknown type pointer.
Why not simply return the pointer, instead of using an out-parameter?