In fact, this example would compile because you can use curly braces in this way to encapsulate lines of code, but realize for now, that, not good.
实际上,这个例子可以编译,因为你可以用这种方式来压缩代码行,但是请认识到,那个,不太好。
In a compiled language, you have an intermediate step, in which you take the source code, it runs through what's called a checker or a compiler or both, and it creates what's called object code.
而在编译语言里,你就会经过一个中间的步骤,在这种语言里输入源码后,先经过过滤器,或者编译器检查后,它会创建一个叫做目标代码的东西。
> That lets the compiler know that you want to use some actual compiled code from that library.
>,那是告诉编译器我们想要在程序库中,使用一些当前的编译后的代码。
The only thing that compiler needs to know is kind of what pattern to look for in the rest of your code.
编译器需要知道的唯一的东西是,用来在剩下的代码中寻找的函数形式。
I just reran make or GCC does it for me, and now I've got all these errors. Well, let's see.
我刚重新运行了make,或者GCC为我编译了代码,现在我得到了这些错误,好的,让我们看看。
And if it sees S-W-A-P, open parentheses, close parentheses, and it hopefully sees two ints inside of it, that's all it needs to do in order to finish compiling your code.
如果它看到了SWAP,左圆括号,右圆括号,它可能载里面看到两个int数,那是它所需要做的,用来完成代码的编译。
So that is a flag that tells the compiler that I want to use or link into my own program code that someone else wrote that lives somewhere else on the system whose moniker is CS50.
所以那是一个标记,用来告诉编译器我想使用,或连接我自己的程序代码到一个叫做CS50的系统中的程序,可能其他人在那个系统写了这些程序。
So you have to somehow convert the source code, the C code into 0s and 1s and for that process there exist this tool called a compiler that someone else wrote that takes this stuff as input and produces this stuff as output.
所以你必须把源代码,即C语言代码转换成二进制文件,这个过程就需要我们提到的编译器了,它是由别人编写的一个软件,以这些代码作为输入,将会产生的输出。
应用推荐