Re: warning: local declaration hides instance variable
Re: warning: local declaration hides instance variable
- Subject: Re: warning: local declaration hides instance variable
- From: Wincent Colaiuta <email@hidden>
- Date: Mon, 3 Sep 2007 19:31:33 +0200
El 3/9/2007, a las 19:13, Tron Thomas escribió:
@interface Value : Object
{
@private
int amount;
}
+ (Value*)valueWithAmount:(int)amount;
You have a instance variable called "amount" and a method-local
variable called "amount" which hides it. Pick a different name for
your "amount" parameter in the valueWithAmount: method. For example,
"anAmount", or anything else.
Cheers,
Wincent
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden