C++ 错误 4 错误 C3861:“snprintf”:未找到标识符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9052224/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error 4 error C3861: 'snprintf': identifier not found
提问by user690936
i am running a program on win 7 via visual studio 2008
我正在通过 Visual Studio 2008 在 win 7 上运行一个程序
and i am getting this error:
我收到此错误:
Error 4 error C3861: 'snprintf': identifier not found
错误 4 错误 C3861:“snprintf”:未找到标识符
i have included stdio header...
我已经包含了 stdio 标头...
i don't know what else it can be missing
我不知道还能缺少什么
回答by Corbin
Looks like on Windows, the function is prefixed with a _. Also, the function is deprecated in favour of a safer one:
看起来在 Windows 上,该函数以 _ 为前缀。此外,该功能已被弃用,以支持更安全的功能:
http://msdn.microsoft.com/en-us/library/2ts7cx93(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/2ts7cx93(v=vs.80).aspx