What library is strcat_s in?

I tried to include string.h

and stdlib.h

, but I still get <.90> errors.

This leads me to conclude that this is in a different library that I have not included. Where is it?

I am using the gcc compiler - the code is written on windows but about to compile and run on a unix server.

+3
c strcat-s


source to share


4 answers


There is an implementation in slibc .



+4


source to share


strcat_s

can be found in string.h

as of C 2011. Generally speaking, only microsoft has implemented these alternative features.



+8


source to share


It is present string.h

on Windows platforms

You can also refer to this cppreference

Defined in title <string.h>

You might be better off using strcat if you are on a UNIX platform.

+4


source to share


It seems to be part of the C11 standard:

http://en.cppreference.com/w/c/string/byte/strcat

https://www.securecoding.cert.org/confluence/display/c/API02-C.+Functions+that+read+or+write+to+or+from+an+array+should+take+an+argument + to + specify + the + source + or + target + size

enter image description here

To be honest, I'm not very good at standards when it comes to standards, and I could be quite wrong. <

+2


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics