否。在函数_definition_ empty''()''中立即表示无参数。 No. In a function _definition_ empty ''()'' immediately means "no parameters". < Style Opinion> 我个人认为放置void在parens里面 使代码更具可读性。但这是我的意见。 < / Style Opinion> - Thomas Matthews C ++新闻组欢迎信息: http: //www.slack.net/~shiva/welcome.txt C ++常见问题: http://www.parashift.com/c++-faq-lite C常见问题: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.learn.c-c ++ faq: http://www.comeaucomputing.com/learn/faq/ 其他网站: http://www.josuttis.com - C ++ STL图书馆书籍 http://www.sgi.com/tech/ stl - 标准模板库<Style Opinion>I personally believe that placing "void" inside the parensmakes the code more readable. But that is my opinion.</Style Opinion>--Thomas MatthewsC++ newsgroup welcome message: http://www.slack.net/~shiva/welcome.txtC++ Faq: http://www.parashift.com/c++-faq-liteC Faq: http://www.eskimo.com/~scs/c-faq/top.htmlalt.comp.lang.learn.c-c++ faq: http://www.comeaucomputing.com/learn/faq/Other sites: http://www.josuttis.com -- C++ STL Library book http://www.sgi.com/tech/stl -- Standard Template Library 参数"。parameters". 即使我使用函数的empty()定义作为唯一的 声明? 我还有另外一个问题。如果我正在调用一个函数并且还要使用b 投射参数的值,那么这个演员是否会在原型引起的自动转换之前或之后出现?我猜这个问题 适用于没有原型的情况 - 这种情况发生在促销之后或者 之后?Even if I use the empty () definition of a function as the onlydeclaration?I also have another question. If I was calling a function and alsocasting values of arguments, does this cast come BEFORE or AFTER theautomatic conversion caused by the prototype? I guess the questionapplies when there is no prototype - does the case happen before orafter the promotions? 这篇关于如果我定义一个没有参数的函数,我应该放空吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-16 03:30