Skip to main content
gamedev.net
🔒 Locked

weird pointer question

Started by randomDecay 0 replies 650+ views
Original Post
randomDecay
randomDecay
I've got a pointer, call it A. The first four bytes of what the pointer points to is an address that I want A to point at now. I've tried doing it, but nothing seems to work. *A = *(long*)A; // doesn't work A = *(long*)A; // compiler error Anybody know how to do it?? Thanks. [edited by - randomDecay on February 2, 2003 2:34:02 PM]
civguy
civguy

  
int* a = ...;
a = reinterpret_cast<int*>(*a);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.