Warning C4996: This function or variable may be unsafe — compared to GCC on POSIX

前端 未结 3 1457
无人共我
无人共我 2020-12-30 01:08

I notice that MS compilers give \"deprecated\" warnings for cstdlib functions like getenv. MS has invented its own standard such as _dupenv_s

3条回答
  •  忘掉有多难
    2020-12-30 01:38

    It annoys the heck outta me that Microsoft chose to do this. I know how to call all the functions safely, I don't want or need these extra warnings.

    Just set _CRT_SECURE_NO_WARNINGS and be done with it. It's really that silly.

提交回复
热议问题