_ui64t0a warning

Is it okay to have a warning like this:

warning C4996: '_ui64toa': This function or variable may be unsafe. Consider using _ui64toa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Or should I use _ui64toa_s as suggested by the warning. When I use _ui64toa_s there is no warning anymore.

my question is: How will I know if I will use _ui64toa_s instead of _ui64toa or should I use _ui64toa_s to be safe all the time since whenever I use similar function like _ui64toa warning appears and says it is deprecated and consider using (function)_s instead? Thanks.
Where the hell did you see this?
I used this method first:

_ui64toa(userInput, convertToArray, 10);

and when I debugged it the warning appears as shown in my post above.

So I replaced it with this:

_ui64toa_s(userInput, convertToArray, 30, 10);

then the warning disappears.

Since warning is not good in programming I used _ui64toa_s to prevent deprecation. Am I correct? Thanks.
Last edited on
Microsoft compiler.
They have introduced a lot of 'safer' alternative functions for the standard and 'unsafer' C string related functions
When you use one of the standard C string functions you get this warning/suggestion.
Last edited on
so you mean functions with _s is for C++ but not applicable in C and function without _s is for C although it can also be implemented in C++? Am I right? or I misunderstood your explanation?
The _s functions are just a microsoft compiler specific alternative for the ones without the s (whether or not you are writing C or C++)
Last edited on
I see. Thanks a lot.
Topic archived. No new replies allowed.