strdup or _strdup?

后端 未结 7 2104
我寻月下人不归
我寻月下人不归 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

提交回复
热议问题