strcmpi更名为_strcmpi? [英] strcmpi renamed to _strcmpi?
问题描述
在MSVC ++,有一个功能 strcmpi 以不区分大小写C-字符串比较。
当你尝试使用它,它去,
这POSIX功能是在Visual C ++开始使用2005年的ISO C ++一致性_stricmp代替pcated德$ P $。
块引用>我不明白是为什么ISO不想MSVC ++使用strcmpi,为什么_stricmp的preferred方式,以及为什么他们会懒得重命名功能,以及如何函数以下划线开始ISO一致性。我知道必须有这一切的原因,而且我怀疑其因为strcmpi是非标准的,也许ISO希望非标准的扩展开始一个_underscore?
解决方案ISO C保留为将来的扩展一定的标识符(见的这里),包括任何开头STR。
In MSVC++, there's a function strcmpi for case-insensitive C-string comparisons.
When you try and use it, it goes,
This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant _stricmp instead.What I don't see is why does ISO not want MSVC++ to use strcmpi, and why is _stricmp the preferred way, and why would they bother to rename the function, and how is a function beginning with an underscore ISO conformant. I know there must be a reason for all this, and I'm suspecting its because strcmpi is non-standard, and perhaps ISO wants non-standard extensions to begin with an _underscore?
解决方案ISO C reserves certain identifiers for future expansion (see here), including anything that starts with "str".
这篇关于strcmpi更名为_strcmpi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!