|
Re: How to manipulate a variable value using an array?
I need you to confirm if what I am thinking is correct:
myVar = 1; Establish the "shell" as being = 1
array[1] = &myVar; Let the 1st value of array[] = the address of the "shell"
(*)(array[1]) = 2; the * means modify/check the contents of the address of myVar
printf(*myVar); since the shell wasn't updated, the * is needed to display the contents of the address of myVar since printf(myVar) would return 1
__________________
I quit FRC over 2 years ago (more if you're reading this past 2010).
Last edited by amateurrobotguy : 13-12-2007 at 00:36.
|