Click to See Complete Forum and Search --> : Theoretical question about passing and adresses


arnaudtemme
02-14-2006, 10:32 AM
Guys and gals,

this is just to get the picture. Suppose I need to change a struct in a subfunction AND in a subfunction of that subfunction. I think I need to pass like this. Main:my_struct adresses;
my_routine (&adresses, other variables); my_routine:void my_routine (my_struct *adresses, other variables){
adresses->streetnumber -= 1;
my_subroutine(adresses, others);
}my_subroutine:my_subroutine (my_struct *adresses, others){
adresses->city = "New York";
etc;
}

bwkaz
02-14-2006, 08:34 PM
Looks about right to me. :)

arnaudtemme
02-15-2006, 04:24 AM
Fair enough, thanks!