为什么main()在C ++中不能内联? [英] Why main() in C++ cannot be inlined?

查看:172
本文介绍了为什么main()在C ++中不能内联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读C ++常见问题,我注意到一个句子。

I was reading the C++ FAQs and I noticed one sentence.


main()不能内联。

main() cannot be inline.

为什么是这样?

推荐答案

p>在C ++中,在代码中调用main函数是不合法的,因此它不可能被内联。

In C++ it is not legal to call the main function in your code, so there'd be no way it could ever be inlined.

这篇关于为什么main()在C ++中不能内联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆