본문 바로가기

Programming/VC++

[C] memcpy()

출처 블로그 > C, C++ STUDY
원본 http://blog.naver.com/seunglak/100012068253

원형 : int memcpy(char*, char*, int)

 

 

int memcpy(char* temp1, char* temp2, int n) ;이라고 하면 temp2의 내용중 크기 n만큼을 temp1에다가 채우라는 이야기 입니다. 즉,

 

char temp1[10];

char temp2[15];

 

memcpy(temp1, temp2, 5);

 

temp2의 0~4까지의 내용을

temp1의 0~4에 복사하는겁니다

'Programming > VC++' 카테고리의 다른 글

[C] strncpy()  (0) 2007.08.01
[C] trim()  (0) 2007.08.01
[C] strstr()  (0) 2007.08.01
[C] C언어 Function Reference  (0) 2007.08.01
[C] token 사용법  (0) 2007.08.01