ArgC How many words were typed at the prompt, by default, Arg C, should always be at least one.
提示符那里默认要输入多少单词,至少需要一个单词。
So at first this might seem very limited in terms of functionality for you but when I first logged in to that cloud, recall that my prompt looked like this.
从字面上来看,好像,看不出来它是干嘛的,但是当我第一次登录到,“云“,好像是这样的提示。
I'm talking about trying to prevent suffering and prompt for people who don't want to going on living themselves or in the case of babies allowing parents to make that judgment for themselves and their family.
我所做的是为了防止痛苦,或是帮助那些不愿,活下去的人们,或是让上述例子中的孩子的父母,能够作出决定,为他们自己,也为这个家庭。
No new line just 'cause I made an aesthetic call that this looks kinda nice if the prompt stays on the same line.
基于美学等原因,我们就不换行了,让将要打印出的东西跟在其后。
And I get an answer of 3, but it seems to be garbled with my prompt.
我得到了答案3,但是它可能,误解了我的意图。
I'm just gonna hit enter to leave it alone, and now I'm back at the prompt.
我们只需要敲入回车键,不管它就可以了,我们又立刻回到刚刚的界面。
And now I met a prompt that says who I am as a little reminder.
我们会很快看到一个提示,表明我是谁。
And now notice my prompt changed a little bit.
注意到没?前面的提示改变了一点点。
So when you have a function called GetString, -- that means it's going to get a string from the user -- -- prompt the user for a string -- whereas printf is literally going to print it, not to paper, but to the screen.
所以当你有一个叫做GetSting的函数,它的意思是从用户那获得一个字符串-,提示用户输入一个字符串-,然而printf的确是用来打印的,不是在纸上,而是在屏幕上。
So go ahead and prompt Jordan for an int.
往前走并提示Jordan给你一个int数。
So with the fact that I'm now just back at my prompt is a good thing so now GCC hello c if I type this command GCC hello.c, this is gonna run this program that Apple wrote in this case GCC or someone else wrote called GCC.
也就是说我们现在安全返回,说明一切正常,现在我输入这条命令:,这代表运行hello,c这个程序,是由“Apple“或其他人编写的,名为。
So we'll talk a bit more about this idea of functions today, but, get int, again, can think of it as a black box, whose purpose in life is to prompt the human for input and pester the human if he or she doesn't actually give it int, but then once it has that, has entered it from the user, it's quote unquote, returns it to you.
所以我们进今天将多讨论点这个函数的概念,但是,GetInt,我们可以把它当做一个黑盒子,它的唯一目的是提示人们来输入,并且如果他或她没有,给它int数,则会纠缠用户,但是一旦它得到了,用户输入的int数,对输入进行引用,返回给你。
I mean what if you're running so many things, what if the user has copied and pasted their thesis and just pasted it at the blinking prompt such that you're now out of memory because your computer is somewhat limited in memory so get string cannot possibly return all those characters or fit all of those characters in memory and return to you the address of the first.
如果你运行了很多程序,假使用户复制粘贴了他们的论文,只是粘贴在光标提示符那里,这样就出现了内存不足,因为你们的计算机的内存是有限的,所以GetString不可能返回所有的字符,或者保存这些字符到内存中,并且返回第一个字符的地址。
应用推荐