And here, too, it's just a little baby program in that I'm hardcoding the expression 17 divided by 13.
然后这里,这只是一个子程序,在那里面我硬编码了表达式“17除以13“
Why not write the program in a way where you figure out dynamically when the program is run how much memory you need rather than hard coding in two with or within that constant.
为什么不写一个可以动态的方式写那个程序,程序可以动态分配内存,而不是用常量硬编码两个值。
For instance in the past, we had that silly little program for computing the average of some quizzes and it was actually a pretty bad implementation because I had essentially hard coded in the number of quizzes.
比如在以前,我们做了一个,计算平均数的程序,这是一个相当挫的实现,因为我硬编码了测试的数字。
So I wrote a little program called "chart" that, based on some data I happened to hardcode into the program, shows us their numbers for the past several years.
我写了一个叫做“图表“的小程序,基于我在程序中硬编码的一些数据,向我们显示在过去几年中我们课程的人数。
It's not nearly as graphical but at least we're not hardcoding programs that are otherwise uninteresting.
这可不是绘画,我们至少不是在硬编码程序,那是没有趣味的。
Last time we used printf generally to print a static string, like a hardcoded string, like "David," just for example's sake.
上次我们通常用“printf“,来打印一个静态的字符串,像硬编码的字符串“David“,这只是个例子。
Because I've hard coded the zero, it's just capitalizing they first character.
因为我硬编码了那个零,它只是把第一个字母变成大写。
应用推荐