• ... will not last long

    That'll be it. As soon as the address it retrieved the data is freed and then it gets overwritten by the next allocated variable!

    I'd also add a check to make sure that E.getAddressOf is returning as nonzero value. If for some reason the array isn't allocated in one chunk then getAddressOf won't return a pointer to it, and you don't want to be trying to dereference a null pointer in C.

About

Avatar for Gordon @Gordon started