|
Re: var pointers
[Re: Sepiantum]
#297098
11/05/09 03:09
11/05/09 03:09
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
try it with
int foo = 123; //or some other value. freshly declared variables do NOT get set to zero.
int* bar = &foo;
And to edit with the pointer you would to this:
*bar += 5000;
but make sure foo is a global variables, otherwise its address becomes invalid if the code hits a wait(1) command.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: var pointers
[Re: Sepiantum]
#297099
11/05/09 03:10
11/05/09 03:10
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Can you show a snippet which doesn't work, and explain what about it doesn't work (syntax error, incorrect results, etc)?
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|