在此范围内未声明sprintf_s [英] sprintf_s was not declared in this scope
本文介绍了在此范围内未声明sprintf_s的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个使用sprintf_s
的C程序.它在Windows中可以正常工作,但是当我在Linux中编译代码时,会出现此错误:
I have a C program that uses sprintf_s
. It works fine in Windows, but when I compile my code in Linux it gives this error:
sprintf_s was not declared in this scope.
为什么会发生这种情况,我该如何解决?
Why does this happen and how can I fix it?
推荐答案
这不是标准的,在Linux上找不到这种功能.
It's not standard, you won't find such function on Linux.
标准功能snprintf
应该具有相似的语义.
Standard function snprintf
should have a similar semantics.
这篇关于在此范围内未声明sprintf_s的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文