Just do the following:
__declspec(deprecated) void foo(int) {}
And if you want the compiler to generate a specific message when compiling an obsolete function, do the following:
__declspec(deprecated("foo(int) is a deprecated function.")) void foo(int) {}
Nawaz source
share