+ 4

unable to use safe string function in C

C11 introduces new function to eradicate buffer overflow while using string in C, --> strnlen_s, strncmpy_s etc where introduced, according to my research I can use this function using #define __STDC_WANT_LIB_EXT1__ 1, the problem now is that it's not working https://code.sololearn.com/cvNapT5f0CFV/?ref=app

3rd Apr 2019, 6:25 PM
✳AsterisK✳
✳AsterisK✳ - avatar
9 ответов
3rd Apr 2019, 7:25 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 5
~ swim ~ its not working on a compiler
3rd Apr 2019, 8:22 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 4
~ swim ~ according to the information TheWhiteCat💡 provided for me, it was not full accepted into the gnu11
3rd Apr 2019, 8:26 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 4
version 4.2.1 on my mobile 4.9.2 on my PC
3rd Apr 2019, 8:28 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 4
thanks ~ swim ~ 👍👍👍
3rd Apr 2019, 8:33 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 3
You can find useful info in this discussion: https://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu?lq=1. According to the discussion this prefix "z" is not supported by Microsoft. You can use "I". You can see it in the code. https://code.sololearn.com/cvEyE4Wac4m1/?ref=app
3rd Apr 2019, 6:55 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 3
TheWhiteCat💡 thanks I will check the link out now, but the last printf is not outputting anything, which is the part I really need edited: thanks, the thread do not answer my question
3rd Apr 2019, 7:17 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
thanks alot TheWhiteCat💡 , now I need to get my hope out of that, maybe create my own safe functions, 😉😉😉😉
3rd Apr 2019, 7:30 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
*AsterisK* , you are welcome 😉
3rd Apr 2019, 7:35 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar