Banned.h多年来一直被吹捧为C ++的SDL工具,可以从微软下载24817下载。看起来微软已经删除了该文件。以下来自在线资源的链接反复出现在微软下载中心用404。 Banned.h的命运是什么?它被别的东西取代了吗?
答案 0 :(得分:0)
I'm pretty certain they just made their undesirable functions reported as such by default, and you have to use _CRT_SECURE_NO_WARNINGS
to stop being warned about them.
This makes sense from a security viewpoint since things should be more secure by default and require extra effort to make them less secure.
That ignores the fact, of course, that it's still relatively easy to screw things up if you misuse the "safe" (or security-enhanced) functions.
By that I mean such things as providing incorrect buffer sizes for strcpy_s
, or giving an invalid but non-null pointer to fopen_s
, which is, surprisingly, why they deprecated the original ones in the first place :-)
The unsafe ones are perfectly okay to use if you know what you're doing.
答案 1 :(得分:0)
是的,它仍然存在,我的意思是将此标头保留在您的代码中仍然是合理的。最新版本可以在这里找到: https://github.com/x509cert/banned 您还将在自述文件中找到一些有用的信息。