Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我的函数返回一些值,那么使其内联应该给出错误?像内联
int fun(int x) { return x*x) }
是 main 中的函数,它应该像这样打开
main() { int a=fun(3);// compiler will resolve it as a=return 3*3 }
不,它不会给出任何错误
可能是内联的小函数
更多信息请点击这里