I just recently changed my IDE to MS Visual Studio 2005 coming from MSVC++ 6, and I've gotten a lot of deprecation warnings. Rather than ignore the warning, I started to change them to the _s equivalents. However, I then found out that these were microsoft-only implementations.
I read somewhere that they were pushing for these to become part of the standard. Is it?
Is it a good idea to use these _s functions? Or should I use something else?
Thanks.
The *_s()
functions are not part of the C standard, but there is a pending 'Technical Report' proposing that they be added (I'm not sure if the routines in the TR are exactly the same as Microsoft's or if they're just similar).
TR 24731-1: Extensions to the C Library Part I: Bounds-checking interfaces:
If you want to continue to use the old functions you can keep the deprecation warnings quiet by defining the macro _CRT_SECURE_NO_WARNINGS
(was _CRT_SECURE_NO_DEPRECATE
which might still be supported).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With