View Single Post
Old 11-03-2004, 12:11 PM   #3 (permalink)
LauraP
 
Newb Techie

Join Date: Oct 2004

Posts: 14

LauraP

Default

so for passed by reference it would be like this:

void foo(int *x, int *y)
{
i = *y;
*y += 3;
}

void main()
{
i = 2;
j = 3;
foo(&i, &j);
printf("%d %d\n", i, j);
}

Is this what you mean?
LauraP is offline