开发者

modulus operator objective not working? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学编程 Closed 11 years ago.

% operator isn;t working in objective. I am doing simple seconds to minute:second conversion. the modulus operator isn't working it is giving me error "Invalid operands to binary %" what does that mean and what can I do to fix this.

thanks TC


Modulas operator only works for integers..Check whether your operands are floats..If they are floats or doubles, you can use fmodf instead..


It sounds like you're probably trying to use % on a floating point operand, but % only works for integer types.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜