Difference of stricmp and _stricmp in Visual Studio?

若如初见. 提交于 2019-12-04 03:23:33

stricmp is a POSIX function, and not a standard C90 function. To avoid name clashes Microsoft deprecated the non-conforming name (stricmp) and recommends using _stricmp instead. There is no difference in functionality (stricmp is merely an alias for _stricmp.)

For many library functions, including all the <string.h> functions, the underscore prefixed versions are/were Microsoft's idea of something. I don't recall exactly what.

The non-underscored version is highly portable. Code which uses _stricmp(), _strcpy(), etc. must be handled somehow—edit, #defined, etc.—if the code will be processed by another compiler.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!