warning C4996: 'sprintf' was declared deprecated see declaration of 'sprintf' 的警告消除方法

在vs2003, vs2005中   用sprintf   会出现   warning   C4996:   'sprintf'   was   declared   deprecated see   declaration   of   'sprintf'  的警告 消除方法

1: 文件最开始: #define   _CRT_SECURE_NO_DEPRECATE  或者干粹在工程属性中设置。

2: 不屏蔽的话就只能调用VS鼓吹的那些带“_s”后缀的非标准函数。

3: 用StringCchPrintf

你可能感兴趣的:(c,deprecated)