sprintf_s was not declared in this scope

前端 未结 6 1221
悲&欢浪女
悲&欢浪女 2021-01-01 10:28

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 dec         


        
6条回答
  •  粉色の甜心
    2021-01-01 11:12

    sprintf_s is not part of the standard C library, and you won't be able to use it in Linux.

    However, snprintf is standard and should do the same task.

提交回复
热议问题