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

Toastinator

macrumors newbie
Original poster
Aug 20, 2011
17
0
I just started coding today, so I guess you could call me a noob. I was following a tutorial and came across multiple errors when I attempted to compile the files. Below are screenshots of the codes and the errors/warnings with them. If you can provide any help, I thank you in advance.

Screenshot2011-08-20at13055PM.png


Screenshot2011-08-20at13130PM.png


In text:

Code:
- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Relinquish ownership any cached data, images, etc that aren't in use.
}

'didReceiveMemoryWarning' undeclared (first use in this function)
expected ';' before '{' token


Code:
@end

expected declaration or statement at end of input
'@end' missing in implementation context

Code:
- (void)setMainImage:(UIImage *)_img {
	[img release];
	img * [_img retain];
	}

invalid operands to binary * (have 'struct UIImage *' and 'id')
 
Last edited by a moderator:
Somewhere above the didReceiveMemoryWarning method, you may be missing a closing brace. For the other error, try this: img = [_img retain];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.