Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kpiller08

macrumors newbie
Original poster
Mar 16, 2010
1
0
I am so new to this iphone development and am following along in a cocoa programming book. I followed the instructions to a tree and when i build and run i get lots of undeclared errors. I don't know how to fix.
Code:
#import "AccountController.h"

@implementation AccountController

- (void)awakeFromNib {
	[COLOR="RoyalBlue"]account = [[Account alloc] init];[/COLOR]
	[display setFloatValue:[account balance]];
}


- (IBAction)deposit:(id)sender {
	[COLOR="RoyalBlue"][account deposit:20.00f];[/COLOR]
	[display setFloatValue:[account balance]];
}

- (IBAction)withdraw:(id)sender {
	[COLOR="RoyalBlue"][account withdraw:5.00f];[/COLOR]
	[display setFloatValue:[account	balance]];
}

- (void)dealloc {
	[COLOR="RoyalBlue"][account release];[/COLOR]
	[super dealloc];
}

@end

everything in blue is undeclared. do i need to got into the account.h file to fix?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
So new that you didn't post this in the correct place. I have requested that the mods move it to the iPhone Programming forum.

Please post the .h file that goes with this .m file. Normally you'd delcare you instance variables in there. I suspect you haven't declared account in there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.