将变量名称定义为 __00000001、__00000002 等有什么优点吗?
示例:
int __00000001, __00000002 = 0;
for (__00000001 = 0; __00000001 < 10; __00000001++) {
__00000002 = __00000002 + __00000001;
}
...
更新:这是我几年前的一门编程课上提到的,我记得教授说使用它有一些优点。然而,我记不起更多的信息了。也许我错了。
最佳答案
这些特定的变量名称不可用于用户程序:
All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use. (C11, section 7.1.3, paragraph 1)
所以这是一个很大的缺点。
关于c++ - 在C/C++中将变量名定义为__00000001有什么好处,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53074552/