请注意函数本身,它没有输入。
我意思是,void表明是没有输入。
就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。
Notice in this program I have not checked whether or not the user actually provided input.
I can have functions with no parameters, that's fine, I will still need the open and close paren there to identify that I have no parameters.
我每次都需要进行输入码?,函数可以没有参数,我依然需要前后括号,来定义我没与参数。
Notice in this program I have not checked whether or not the user actually provided input.
就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
应用推荐