这个运算符是什么意思?/= [英] What does this operator mean? /=
本文介绍了这个运算符是什么意思?/=的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚遇到了一些带有该行的代码:
I have just come across some code with the line:
n /= 10;
我认为这是一个拼写错误并删除了 /
使其成为 n = 10
,但该程序不再有效.
I assumed it was a typo and removed the /
to make it n = 10
, but the program no longer works.
以前从未见过这种运算符,有人知道吗?
Never seen this sort of operator before, anybody know?
推荐答案
/=
是一个速记运算符.
a /= b
相当于
c = a/b;
a = c;
这篇关于这个运算符是什么意思?/=的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文