iphone - use % operator in xcode -


i'm trying make function use % operator in objective c function is:

-(void) image1:(uiimageview *)img1          image10:(uiimageview *)img10          image100:(uiimageview *)img100          score:(nsinteger *)sc {         nsinteger* s100,s10,s1;      s100 = sc % 100;     s10 = (sc - s100 * 100) % 10;     s1 = (sc - sc % 10);     nslog(@"%d",s1); } 

but got errors.. can guide me solution

you can't implicitly create objects that. want s100, s10, s1 , sc c-style variables, you've declared s100 , sc pointers, though going hold objective-c objects. suggest change nsinteger* nsinteger in both cases. not things starting in ns objects.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -