평가 및 의견을 보내려면 클릭하십시오.
MSDN
MSDN Library
개발 도구 및 언어
Visual Studio 2008
Visual Studio
Visual C++
Visual C++ 참조
Visual C++ 라이브러리 참조
Run-Time Library
Alphabetical Function Reference
 memcpy, wmemcpy
모두 축소/모두 확장 모두 축소
이 페이지에서 다루는 특정 제품:.
Microsoft Visual Studio 2008/.NET Framework 3.5

다음 제품들은 다른 버전에서 다루어 집니다.
Run-Time Library Reference
memcpy, wmemcpy

Copies bytes between buffers. More secure versions of these functions are available; see memcpy_s, wmemcpy_s.

void *memcpy(
   void *dest,
   const void *src,
   size_t count 
);
wchar_t *wmemcpy(
   wchar_t *dest,
   const wchar_t *src,
   size_t count
);
dest

New buffer.

src

Buffer to copy from.

count

Number of characters to copy.

The value of dest.

memcpy copies count bytes from src to dest; wmemcpy copies count wide characters (two bytes). If the source and destination overlap, the behavior of memcpy is undefined. Use memmove to handle overlapping regions.

Security Note   Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see Avoiding Buffer Overruns.

The memcpy and wmemcpy functions will only be deprecated if the constant _CRT_SECURE_DEPRECATE_MEMORY is defined prior to the inclusion statement in order for the functions to be deprecated, such as in the example below:

#define _CRT_SECURE_DEPRECATE_MEMORY
#include <memory.h>

or

#define _CRT_SECURE_DEPRECATE_MEMORY
#include <wchar.h>

Routine

Required header

memcpy

<memory.h> or <string.h>

wmemcpy

<wchar.h>

For additional compatibility information, see Compatibility in the Introduction.

See memmove for a sample of how to use memcpy.

커뮤니티 콘텐츠   커뮤니티 콘텐츠란?
새 콘텐츠 추가 RSS  주석
Processing
© 2009 Microsoft Corporation. All rights reserved. 사용약관 | 상표 | 개인정보취급방침 및 청소년보호정책
Page view tracker