• So I just realized this is a new MacBook Pro that I didn't actually download the compiler onto it apparently.

    所以,我才意识到这是一台新电脑,显然我并没有把编译器安装到上面。

    哈佛公开课 - 计算机科学课程节选

  • > So this time I had the foresight to install this compiler but what I'm gonna do is this.

    >,这次我非常有先见之明地,安装了这个编译器,但是我这次要做的却是。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    而在编译语言里,你就会经过一个中间的步骤,在这种语言里输入源码后,先经过过滤器,或者编译器检查后,它会创建一个叫做目标代码的东西。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • You can compel the compiler to treat some value as a different type of value, at least if it makes intuitive sense that that should be possible.

    你可以控制编译器处理,不同类型的数据,至少我们凭直觉,它应该是可能的。

    哈佛公开课 - 计算机科学课程节选

  • So you're implementing this black box, and if its purpose in life is to actually return a value, you have to tell the compiler what kind of value to expect, and this is going to have ripple effects.

    你在实现这个黑盒子,如果它的目的是,返回一个值,你必须告诉编译器你期望的是什么类型的值,这个将是一个连锁反应。

    哈佛公开课 - 计算机科学课程节选

  • So what that means is the compiler is actually going to first "cast" so to speak 13 from whatever it is - to a float -- to a floating point value -- and then perform the division for us.

    所以这里的意思是编译器将,做“计算“,譬如13这样一个浮点数,-到另一个浮点数-,然后为我们处理除法。

    哈佛公开课 - 计算机科学课程节选

  • The compiler is going to ignore all of this so-called "pretty printing" -- all of this sort of indentation, -- all of this white space -- that's really for the human's benefits, both yours, your colleagues, the teaching staff, and the like.

    编译器会忽略所有的叫做,“优美打印“--所有的这类缩进,所有的这些空格-,只是为了我们的利益,也是你的,你的同事,教员的和其他人的利益。

    哈佛公开课 - 计算机科学课程节选

  • > 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.

    编译器需要知道的唯一的东西是,用来在剩下的代码中寻找的函数形式。

    哈佛公开课 - 计算机科学课程节选

  • You can't just take a quoted string back to back with another quoted string so you'd get some kind of compiler error.

    你不能让一个引起来的字符串跟另一个引起来的字符串,背靠背,这样编译就会出错。

    哈佛公开课 - 计算机科学课程节选

  • So I'll now start to get into that habit, even though it's a bit of distracting detail, it's just consistent with the expectations that the compiler really has.

    所以我现在将开始养成那个习惯,虽然这是一个有点分散注意力的细节,它只是与编译器,拥有的期望是并存的。

    哈佛公开课 - 计算机科学课程节选

  • My prototype, again, so that I can use it later increment without the compiler wondering what is this increment that you're referring to because it's not otherwise been declared.

    我的函数原型,再次强调,我可以以后使用它,这样编译器就不会疑惑这个你提及的,是什么,因为是没有,被声明的。

    哈佛公开课 - 计算机科学课程节选

  • So those are in fact the patterns of zeroes and ones, the bytes that would have been outputted had I hello c remembered to download the compiler to this computer and run it on that little hello.c file.

    这些都是0和1的模式,如果我记得下载编译器到计算机上的话,我们就能运行下这个,然后看看输出的字节。

    哈佛公开课 - 计算机科学课程节选

  • It turns out you can list one, give it a name, and if you use square brackets, that tells the compiler I actually want to put multiple values inside of this -- inside of this variable and how do we do that?

    结果是你可以列举一个,给它取个名字,如果你使用方括号,那是告诉编译器,在里面我需要许多的值--在这些变量里,我怎么做到的?

    哈佛公开课 - 计算机科学课程节选

  • So, thankfully, C does provide a solution for this, whereby, I can provide a hint, essentially, to the compiler.

    幸亏,C为这个提供了一个解决方案,那样,本质上,我可以给编译器一个提示。

    哈佛公开课 - 计算机科学课程节选

  • Okay, so a compiler.

    我们需要一个编译器。

    哈佛公开课 - 计算机科学课程节选

  • So C or the compiler's for C are kind of dumb, by definition of the language years ago, whereby, they only know about what they've already seen.

    所以C或者C的编译器是有点愚蠢的,根据多年前这个语言的定义,凭借那个,他们只知道,他们所看到的。

    哈佛公开课 - 计算机科学课程节选

  • It's a little more involved on a PC but it's all free, the software you can download, and Linux in similar operating systems generally come with a compiler or you run a simple command to get it.

    在PC机上有点复杂,但是它是免费的,你一般下载的软件,类似Linux的操作系统等等通常都需要,一个编译器,或者你可以运行一些简单的指令来获取。

    哈佛公开课 - 计算机科学课程节选

  • > What exactly is the difference with this system that we have here of compiling and say another compiler for one like the C++?

    >在这个系统上编译,跟在我们这编译有什么不同吗?,也就是说,有没有其他的编译器供C++等语言使用?

    哈佛公开课 - 计算机科学课程节选

  • So putting back that prototype allows me to compile this, because I'm saying proactively to the compiler hey, you're going to see a function called increment.

    把那个原型放回原处使我能够编译它,因为我提前向编译器打了招呼,将看到一个叫做increment的函数。

    哈佛公开课 - 计算机科学课程节选

  • So I tried running a program in this little black and white window called GCC and we'll see it today working properly that is a so called compiler.

    在一个名为GCC的黑色小窗口里,运行我们的程序,然后得出想要的结果,这就是所谓的编译器。

    哈佛公开课 - 计算机科学课程节选

  • - Well -- and I'll fix this blue next time -- I'm first telling the compiler I need access to the standard io library because printf is declared there.

    哦!--下次我把这个字体颜色改成蓝色的-,我先告诉编译器--我需要使用,标准输入输出库,因为printf在那个库里面申明的。

    哈佛公开课 - 计算机科学课程节选

  • Now, you might in some context have to add the right kind of parentheses so that GCC or your compiler doesn't get confused, but really they just reverse each other's processes.

    现在,你可能要在相应的地方,加入一些圆括号,这样GCC或编译器就不会误解你的意思,但是它们颠倒了相互的过程。

    哈佛公开课 - 计算机科学课程节选

  • 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的系统中的程序,可能其他人在那个系统写了这些程序。

    哈佛公开课 - 计算机科学课程节选

  • - You then run a compiler, in our case called "GCC" -- -- one of the world's most popular -- and then you can run it with some number of switches, these command line arguments as they're called that somehow influences the behavior of this program.

    然后你们运行编译器,在这里我们使用叫做“GCC“的编译器-,这是全球最流行的-,然后你们可以通过一些命令来运行这个编译器,这些命令行参数可以,影响这个程序的行为。

    哈佛公开课 - 计算机科学课程节选

  • And if you don't include it, GCC, the compiler will yell at you.

    如果你没有include这个库函数,GCC的时候,编译器就会报错。

    哈佛公开课 - 计算机科学课程节选

  • 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语言代码转换成二进制文件,这个过程就需要我们提到的编译器了,它是由别人编写的一个软件,以这些代码作为输入,将会产生的输出。

    哈佛公开课 - 计算机科学课程节选

  • But the take away for now is that if you don't clue -lcs50, -- you get some mention -- some error message -- about "undefined symbol," and that should be your clue that, "Oh it's undefined in that I haven't told the compiler that I want to link in these zeros and ones."

    但现在如果你删除“-lcs50“,你们会得到一些提示--一些错误信息-,像“未定义的符号“,这可以为你提过线索,“这个没有被定义,我没有告诉编译器,把想把这个与“1“和“0“建立连接,“

    哈佛公开课 - 计算机科学课程节选

  • > What's the difference between a compiler and a Makefile?

    >,编译器和Makefile有什么区别?

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定