The syntax is OK in the sense of, it is an operand, an operator, an operand, so syntactically it's OK.
这里的语法应该是好的,有个运算对象,一个运算符,另外一个运算对象,因此语法上是没错的。
OK, in each case, what these things are doing, is they're doing, what sometimes gets referred to as operator overloading.
这将会是个默认的或者说是,通用的来比较对象是否相同的方法,好,在每个例子中,这些事情正在做的,就是,一些与操作符重载有关的东西。
Well, the assignment operator makes a copy of the thing on the right and puts it in the thing on the left.
赋值操作符把右边的东西,复制到左边。
And h with the carrot or the hat here, well, that carrot or hat tell us it must be an operator, and this is called the Hamiltonian operator.
而且带帽的H,好,这个帽告诉我们它肯定是一个算符,这个被称为哈密顿算符。
The semantics was what caused the problem, because the operator was expecting a particular kind of structure there.
引起问题的是语义,因为运算符需要的是,一种特定种类的数据结构。
The reason I say that is, by having operator overloading I can use 1 generic interface to all of the objects that I want to use.
他在大多数情况下都是对的,我要这么说的原因是,通过运算符重载我可以,用一个通用的借口对。
So there are some downsides, in my view, to doing operator overloading, but there's some real pluses.
它还可以应用于其他一些东西,因此这样做操作符重载,就会产生一些负面影响了,以我的观点来看的话。
Because this is overloading that multiplication operator with two different tasks.
因为这会造成使得乘法操作符,对两种不同的任务造成重载。
And one of the things neophytes trip over early on is that we'll soon see there's not only an equal sign operator, there's equals equals.
这样我们还要引入了一个新的操作符,我们将看到这里不仅有一个等号的操作,还有双等号。
So, I'm now multiplying by the result of calling the size of operator, which we've seen before.
现在我乘以运算符的大小,之前我们看到的。
So this is the equality operator, whereas the single equal sign is the assignment operator.
所以这是相等操作符,然而那个单等号是一个赋值运算符。
Now, we're using the equal equals operator and this conceptually is correct.
现在,我们使用==符号,这是正确的。
Just take a look: if this is 9, 5 divided by 9 is always going to be 0 point something, and if you thus have two integers and you're rounding down, which is what happens when you do integral math we're using this operator, I'm going to get zero times whatever.
稍微看一看:如果这是9,5除以9会得到,0点几,如果你用两个整型数,你舍去小数,这就是当你们,用整型数使用这个操作的所发生的事情,我将得到数值0乘以任何一个数字。
The equal sign is really called the "assignment operator."
那个等号其实是个“赋值运算符“
So the assignment operator thus far makes copies of things.
所以到现在为止,赋值运算符复制了很多数据。
So you don't have to use the assignment operator.
所以你并不需要使用赋值运算符。
So the point is, there is something here called operator precedence, which is what the gentleman said.
这里我要说的就是,这里有个,叫做操作优先的规则,也就是刚才那位先生说的。
That is the address of operator.
这是地址操作符。
Especially in the presence of operator overload.
尤其是运算符重载,这种情况出现的时候。
The * is the "go there" operator.
是“定位“符。
应用推荐