But odds are it's not sufficient just to get it from the user, I, the human need to be handed whatever this function got from the user in some form.
如果只是从用户,我这里获取,好像有点不太准确,我们得交出,该函数从用户那里得到的一切信息。
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的确是用来打印的,不是在纸上,而是在屏幕上。
It's defined in CS50's library; its sole purpose in life is to ask the user for a floating point value and return it.
它被定义在CS50的函数库中,它的唯一目的是,向用户询问一个浮点数的值,然后返回它。
If you instead use GetString, same thing: blinking cursor, the function is just going to wait for the user to type a word, a sentence or whatever, and then hit Enter.
如果你用GetSring来代替它,同样的:闪烁光标,那个函数只是等待用户来,输入一个单词,一个句子什么的,然后敲回车。
应用推荐