
Originally Posted by
why06jz
Yeh this is C++. People need to get with the times. defines aren't necessary anymore. Really it's just a style preference, but It's sort of like wearing clothes from the 80's, it still gets the job done, you just look funny coming to school in a bell bottom pants, a varsity jacket, and listening to RUN DMC on your Walkman.
B-but i kinda like defines
Well really it depends on the situation. I really wanna try some funky things with type casting and types.
Well really i think defines would only be necessary in this type of program( a hack) to lower the memory footprint if you have like 2000 addresses to utilize (like that program from a while ago).
But if you only have like 10, it won't take that much effort to do:
float* No_Spread = (float*)0x00B0EBC8; // type casted to be safe.
And then use the address like:
*No_Spread = 0;
It's more convenient to not have to always remember what type the pointer is to.
Then again having 2000 pointers wouldn't really be that bad in a hack.... Cause i just remembered that we are just accessing the memory from an already instantiated program.
Hmm a question. How much memory does a pointer take up, if the address it points to is already somewhere. I'm guessing about a byte, because we don't need to think about the size of what it points to, just the size of the 0x00B0EBC8 itself.
I dunno, i'm kinda ranting now. Or rather thinking aloud. Or rather rather thinking on keyboard.
Oh it appears that a pointer is 4bytes