Any stack variable (int, float, etc) won't be declared as a pointer.
Recall that a variable containing a * indicates that it is, in fact,
some address in memory that is being pointed to (hence a pointer). If
we recall, then, that memory consists of a "stack" and a "heap" - the
pointer sit
On 23 Dec 2008, at 6:14 pm, aaron smith wrote:
Sorry for the total newb here. What's the right way to create
getters/setters for int's? Without the compiler warning about them?
I've been trying:
-(void)setSomeInt:(int)theInt
{
someInt=theInt;
}
-(int)someInt
{
return someInt;
}
Then c
it looks as if you your class variable someInt declared as (int*), why?
If you want an int, someInt should be declared as an int.
aaron smith wrote:
Sorry for the total newb here. What's the right way to create
getters/setters for int's? Without the compiler warning about them?
I've been tryi
Sorry for the total newb here. What's the right way to create
getters/setters for int's? Without the compiler warning about them?
I've been trying:
-(void)setSomeInt:(int)theInt
{
someInt=theInt;
}
-(int)someInt
{
return someInt;
}
Then calling it..
[myObj setSomeInt:1];
Usually I get