Argument passing regarding ivars
Posted
by
StoneBreaker
on Stack Overflow
See other posts from Stack Overflow
or by StoneBreaker
Published on 2011-01-15T03:34:25Z
Indexed on
2011/01/15
3:53 UTC
Read the original article
Hit count: 332
objective-c
I am passing an iVar into a function. The iVar is a double. The value of the iVar inside the function is correct, but the value of the iVar outside the function is not changed. This must have something to do with the way that I am receiving the iVar into the function. How do I pass a double iVar in so that its value is changed in the object and not only in the function? I do the same thing with pointers and the results are as expected, so I think I am not understanding scalar argument passing in c/objective-c.
© Stack Overflow or respective owner