是在编译时还是运行时评估C ++中的sizeof? [英] Is sizeof in C++ evaluated at compilation time or run time?
本文介绍了是在编译时还是运行时评估C ++中的sizeof?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,此代码段的结果取决于哪台机器:编译器机器或机器可执行文件工作原理?
For example result of this code snippet depends on which machine: the compiler machine or the machine executable file works?
sizeof(short int)
推荐答案
是一个编译时操作符。
sizeof
is a compile time operator.
这篇关于是在编译时还是运行时评估C ++中的sizeof?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文