Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么在 Objective-C 中添加两个浮点数时会出现“预期的表达式错误”?
float animinum = 0.1 animinum = animinum + %0.2;
很确定你想要的是:
animinum = animinum + 0.2;
正如 rmaddy 指出的那样,您可以将其缩短为:
animinum += 0.2;