Thread
:
Parameter passing methods problem
View Single Post
11-03-2004, 12:11 PM
#
3
(
permalink
)
LauraP
Newb Techie
Join Date: Oct 2004
Posts: 14
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
View Public Profile
Visit LauraP's homepage!
Find More Posts by LauraP