Posted: Thu Apr 02, 2009 12:33 pm Post subject: not sure..
heey guys i was reading some posts about pointers in c
and found this: http://forum.cheatengine.org/viewtopic.php?t=386636
i don't get it al..
i think i know what it does and how it works(a little)
but i dont get the: &ulValue in the example, what must be placed in the first arg in the function? or does it return an value at that var? _________________
cheaters are the best race in the world, they love eachother:P, so i would say never fuck poeple of your own race, unless they're beautiful:P
When you place an ampersand (&) in front of a variable, you can basically read it as: the address of....
Also, when you place an asterisk (*) in front of a variable (outside it's declaration), it means: the value at this address....
Code:
int x = 2;
// Make 'y' point to 'x'. Move the address of 'x' into 'y'.
// Note the asterisk means we are declaring a pointer, not taking
// the value at the address.
int *y = &x;
// Now we use the asterisk to get the value 'y' points at.
printf("y points to: %d\n", *y);
// y points to: 2
// We can also change 'x' by changing the value 'y' points to.
*y = 3;
printf("x is now: %d\n", x);
// x is now: 3
So, the reason we pass a pointer to the variable in the function, is because the function needs to be able to change what is in the variable directly.
was reading it.. gave you a repp and i thought hmm this code wasn't there yet right..
went back to the page and reloaded it.. you added something.. already got it but thanks, now i am sure
//edit
hmm.. get an error.. what do i have to do with:
Code:
#define ReadPointer(x, y, ...) _ReadPointer(x, y, __VA_ARGS__, OFFSETS_END)
because it gives me:
[Error] C:\Users\niels kool\Documents\C-Free\Temp\Untitled1.cpp:27: badly punctuated parameter list in `#define' _________________
cheaters are the best race in the world, they love eachother:P, so i would say never fuck poeple of your own race, unless they're beautiful:P
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum