func(&x);
which says, pass the address of the local variable x*x = 1;
the * operator dereferences the pointer so u can modify whatever it points toif(messages("noby") > 5)
mute("noby");
void func (int x) { x = 1; }
it makes a copy of whatever number u pass in func(x), sets that copy to 1, then destroys the copy when returning
void func (int *x) { *x = 1; }
points to the original int that ur trying to change so the change will stay once the function exitsvoid func (int *x) { *x = 1; }
int main () {
int x = 0;
func(&x);
d5572dc
add 2 new commands to automapper - Aerll
d235036
Merge branch 'master' into automapper - Aerll
3c07a2b
fixes #1213 - Aerll
2e7a0be
wrong naming for pointer - Aerll
56a5ee6
formatting.. - Aerll
52fbade
remove unnecessary tiles overwriting - Aerll
292f0a2
no need for all pos rule tests - Aerll
4f18d7f
Merge pull request #1213 from Aerll/automapper - def-git commit --date="Wed Feb 16 14:00 2011 +0100"
git log --pretty=fuller
to see if it worked