strdup or _strdup?

后端 未结 7 2068
我寻月下人不归
我寻月下人不归 2020-12-01 04:05

When I use strdup in Microsoft Visual C++, it warns me:

warning C4996: \'strdup\': The POSIX name for this item is deprecated. Instead, u

相关标签:
7条回答
  • 2020-12-01 04:56

    If you just want to avoid the Warning message:

    Project-> property -> C/C++ -> Preprocessor -> Preprocessor Definitions

    Edit this, and add

    _CRT_NONSTDC_NO_DEPRECATE

    0 讨论(0)
提交回复
热议问题