文章详情
时间:2010-07-21 来源:静止的流水
void *memcpy(void *dest,const void *src,size_t count){ char *pdest = static_cast<char*>(dest); const char *psrc = static_cast<const char*>(src); while(*psrc!='\0'){ *pdest++=*psrc++; } *pdest = '\0'; return dest; } int main(int argc, _TCHAR* argv[]) { char *from = "helloworld"; char *aim = new char[sizeof(from)+1]; char *temp = static_cast<char*>(memcpy(aim,from,sizeof(from))); cout<<temp<<endl; }
辰域智控app
网医联盟app
汇丰汇选App
1970-01-01