Add my own compiler warning

前端 未结 5 1392
庸人自扰
庸人自扰 2021-01-03 19:20

When using sprintf, the compiler warns me that the function is deprecated.

How can I show my own compiler warning?

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 19:49

    To mark a function as deprecated, use __declspec(deprecated), e.g.

    __declspec(deprecated) void f();
    

提交回复
热议问题