为什么在参数中void? [英] Why put void in params?
本文介绍了为什么在参数中void?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
将void放在params中的原因是什么?
What's the reason for putting void inside of the params?
为什么不留空?
void createLevel(void);
void createLevel();
推荐答案
void $圆括号中的c $ c>来自C.在C中,带有空括号的函数可以有任意数量的参数。在C ++中它没有任何区别。
The void
in the parenthesis are from C. In C a function with empty parentheses could have any number of parameters. In C++ it doesn't make any difference.
这篇关于为什么在参数中void?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文