#import "AppController.h"
@implementation AppController
- (IBAction)Calculate
id)sender {
if (Fiber >= 4){
Fiber = 4;
}
Points = ( Calories / 50 ) + ( Fat / 12 ) - ( Fiber / 5 );
}
@end
I'm trying to make a Weight Watchers calculator and I keep coming up with errors. I'm not sure what I'm doing wrong....
I'm getting errors after if (Fiber >= 4){ saying warning: comparison between pointer and integer
Also getting errors after Fiber = 4; saying warning: assignment makes pointer from integer without a cast
And last errors after Points = ( Calories / 50 ) + ( Fat / 12 ) - ( Fiber / 5 ); saying error: invalid operands to binary /
Any help would be grateful. Thank you.
@implementation AppController
- (IBAction)Calculate
if (Fiber >= 4){
Fiber = 4;
}
Points = ( Calories / 50 ) + ( Fat / 12 ) - ( Fiber / 5 );
}
@end
I'm trying to make a Weight Watchers calculator and I keep coming up with errors. I'm not sure what I'm doing wrong....
I'm getting errors after if (Fiber >= 4){ saying warning: comparison between pointer and integer
Also getting errors after Fiber = 4; saying warning: assignment makes pointer from integer without a cast
And last errors after Points = ( Calories / 50 ) + ( Fat / 12 ) - ( Fiber / 5 ); saying error: invalid operands to binary /
Any help would be grateful. Thank you.