About 3,270,000 results
Open links in new tab
  1. Why should you use strncpy instead of strcpy? - Stack Overflow

    30 strncpy is NOT safer than strcpy, it just trades one type of bugs with another. In C, when handling C strings, you need to know the size of your buffers, there is no way around it. …

  2. c++ - strcpy () error in Visual studio 2012 - Stack Overflow

    The simplest way around this is to Define _CRT_SECURE_NO_WARNINGS in your compilers preprocessor settings. Or if you want use the nonstandard strcpy_s which takes a size …

  3. Difference between 'strcpy' and 'strcpy_s'? - Stack Overflow

    strcpy is a unsafe function. When you try to copy a string using strcpy() to a buffer which is not large enough to contain it, it will cause a buffer overflow. strcpy_s() is a security enhanced …

  4. c - strcpy () return value - Stack Overflow

    A lot of the functions from the standard C library, especially the ones for string manipulation, and most notably strcpy(), share the following prototype: char *the_function (char *destination, .....

  5. string - C - why is strcpy () necessary - Stack Overflow

    40 Can someone please explain to me why strcpy () is necessary to assign strings to character arrays, such as in the following code snippet.

  6. C言語の文字列コピーをvisual studioで実行するとstrcpyの部分が …

    strcpy_s を使用して、11文字を10文字バッファーにコピーしようとすると、これはエラーになります。 strcpy_s でこの間違いを訂正することはできませんが、このエラーを検出して、無 …

  7. error: strcpy was not declared in this scope - Stack Overflow

    error: strcpy was not declared in this scope Asked 15 years, 9 months ago Modified 5 years, 2 months ago Viewed 170k times

  8. c++ - Safe Use of strcpy - Stack Overflow

    Plain old strcpy is prohibited in its use in our company's coding standard because of its potential for buffer overflows. I was looking the source for some 3rd Party Library that we link against in...

  9. c - strncpy or strlcpy in my case - Stack Overflow

    1 You should always the standard function, which in this case is the C11 strcpy_s() function. Not strncpy(), as this is unsafe not guaranteeing zero termination. And not the OpenBSD-only …

  10. string - C++: strcpy Function copies null? - Stack Overflow

    The strcpy function copies the string pointed to by s2 (including the terminating null character) into the array pointed to by s1. If copying takes place between objects that overlap, the behavior is …