What lambda that does, it creates on the fly a function, as the program runs. That I can then pass around.
这里的入是在函数运行的时候,由一个函数创建的,然后我会传递这个值。
By putting it in a function bug if I find a bug and I change my program I can just run the function again.
把我输入的值放到一个函数里,如果以后我在程序中发现了一个,并对程序进行更改的话,我可以直接。
And henceforth I'm gonna start calling these tools, these monickers that I can use as building blocks in my own program, it's gonna be called a function as we'll see.
从此以后,我将在我的程序里把这些工具,称为我们可以用来写代码的组件,在我自己的程序中,我们将了解到它被叫做为一个函数。
It's just reminiscent of a previous program 9 9 9 or a previous function the number 9, 9, 9 so what does that really mean?
它提醒之前的程序,或者之前的函数,那个数字,那其实表示的是什么呢?
I'm saying "here comes my main function; here comes the guts of my program."
我指明“这里是我的主函数;,这里是我的程序内容,“
So it turns out that, main, yes, is the default function you write, at least in C, when writing a program.
结果是,main函数,是的,这是你写的默认函数,至少是在C语言中,当写程序的时候。
Well, what's nice about this program is that there's just one function, main, so we don't need to draw the stack and get things all complicated.
这个程序的优点是,这里只有一个函数main,这样我们就不需要,画出堆,也不用那么复杂。
I certainly don't want to assume they're always going to type a three-letter or a four-letter or a two-letter word I want some dynamism but that's fine because get string can get a string of any length, I can then use the string length function to just ask while the program is running how big is the string that I was handed?
当然我不能假设他总是,输入3个字符或4个字符,或2个字符的单词,我想要动态地分配,因为GetString可以获得任意长度的字符串,然后我可以使用strlen函数,来得到那个我传递的字符串,有多长?
应用推荐