sprintf_s问题。它在Windows上工作,但在Xcode上不起作用
sprintf_s(colorBuffer, 255, "%.2X", getAlpha());
result.append(colorBuffer);
错误是:
使用未宣布的标识符'sprintf_s'
sprintf_s(colorBuffer, 255, "%.2X", getAlpha());
result.append(colorBuffer);
The error is:
Use of undeclared identifier 'sprintf_s'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sprintf_s
是C11标准的一部分附件K,标题为“界限检查接口” 。附件K是可选的。附件K没有成功。 在1995年说:
作者甚至提出:
实施它(或部分)的唯一主要编译器是Visual Studio。 XCode(基于Clang)或GCC没有运气。
sprintf_s
is part annex K of the C11 standard, titled "bounds-checking interfaces". Annex K is optional.Annex K hasn't been successful. N1967 Field Experience With Annex K — Bounds Checking Interfaces stated in 1995:
The authors even propose:
The only major compiler to implement it (or part of it) is Visual Studio. No luck with Xcode (based on clang) or gcc.