为什么'int'仅用作int,为什么不用作c ++中的std :: int?

问题描述 投票:2回答:1

与当前C ++中的所有内容均standardized不同,是否有任何特定原因需要将int,char,....,main()和其他内容从中删除。 (不谈论+,-,%,..,因为它不是特定于语言的))

为什么不是这样

   std::int std::main(std::int argc, std::char *argv[])
   {
       //Sample C++ code (incorrect with current standards though)
       std::return 0;
   }

不是标准化不完全超出标准范围吗?

我相信,它们是基本的组件,无论编写简单还是复杂的程序,它们在编写程序时随处可见。仅遵循DRY

原则,它们不包含在标准化中。

与当前C ++中的所有标准都不同,是否有任何特定原因要保留int,char,....,main()和其他内容。 (不谈论+,-,%,..,因为它不是特定于语言的)...

c++ std standards
1个回答
0
投票

您提到的类型是关键字

© www.soinside.com 2019 - 2024. All rights reserved.