- 帖子
- 766
- 积分
- 1451
- 技术
- 117
- 捐助
- 0
- 注册时间
- 2010-5-12
|
本帖最后由 Demon 于 2011-7-9 23:30 编辑
5# powerbat
C++语法是那么说明的,你要是认为不对可以去找定义这套标准的人理论,跟我说没用。
broly 发表于 2011-7-9 21:41
C++标准里根本没有void main()这种写法
这是C++的发明者Bjarne Stroustrup关于void main()的回答
http://www2.research.att.com/~bs/bs_faq2.html#void-main
The definition
void main() { /* ... */ }
is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming implementation accepts
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ } |
|