So now, henceforth, when you say, to declare a function, I am declaring a function here but down here am I quote unquote defining it or implementing it.
从此以后,当你说,声明一个函数,我在这里声明了一个函数,但是到这里我定义它或执行它。
I know it looks like a simple and silly little example, but at the moment, I still have the ability to go in and change the values of the parameters by that little definition.
很简单的有点儿蠢的例子,但是现在,我还是可以通过,一个简单的定义声明,来进去改变参数的值,这样就没意义了,这是因为我并没有用一些。
So in return to, we have a slight variance here, -- where I'm defining apparently -- declaring a function called cube.
作为应答,这里我们有一点变化,这里我显然定义了-,声明了一个叫做cube的函数。
Is is essentially saying, given 2 things, do they point to exactly the same referent?
或者换种思考的方式,大家记得我说过当我们,调用类的定义声明的时候,它会创建一个实例?
Again, I could have some other functions to compute things, but this is typically the place where I'm going to put them in.
注意这个声明典型的行为,就是为了定义了内部变量,以及类的内部特性,在说一次,我可以写一些。
Right now it's empty, actually it's not quite empty, it has a pointer back to the class.
当我调用了这个类的,定义声明的时候,它在内存中的特定点。
So even though increment is obviously increment declared and defined in this function, it's later; so it's too late for me to use it in main.
很明显,即使在这个函数中,已经声明和定义;,也太迟了,以至于,我在main函数中不能使用它。
float So thus far, when we've defined -- declared an int and a float, 2 and so forth, we just put one value in there, the number 2, the number 3.14, just one single value.
至此,当我们定义--声明一个int,和一个,等等,我们只要在那里放置一个值,数字,数字3,14,只有一个值。
应用推荐