{"id":59639,"date":"2023-10-26T14:03:09","date_gmt":"2023-10-26T06:03:09","guid":{"rendered":"\/\/www.dealsbon.com\/?p=59639"},"modified":"2023-10-26T14:03:09","modified_gmt":"2023-10-26T06:03:09","slug":"mzxsdksfzncdzjff","status":"publish","type":"post","link":"\/\/www.dealsbon.com\/blog\/59639.html","title":{"rendered":"memcpy\u6267\u884c\u901f\u5ea6\uff1a\u5feb\u901f\u590d\u5236\u5185\u5b58\u7684\u6700\u4f73\u65b9\u6cd5"},"content":{"rendered":"

  memcpy\u51fd\u6570\u662f\u4e00\u4e2aC\u8bed\u8a00\u6807\u51c6\u5e93\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u4e00\u5757\u5185\u5b58\u4e2d\u7684\u6570\u636e\u590d\u5236\u5230\u53e6\u4e00\u5757\u5185\u5b58\u4e2d\u3002\u5b83\u662f\u4e00\u79cd\u9ad8\u6548\u7684\u590d\u5236\u5185\u5b58\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u66f4\u5feb\u5730\u5b8c\u6210\u4efb\u52a1\u3002\u672c\u6587\u5c06\u8ba8\u8bbamemcpy\u51fd\u6570\u7684\u6267\u884c\u901f\u5ea6\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u5b83\u6765\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\u3002<\/p>\n

memcpy\u7684\u6267\u884c\u901f\u5ea6<\/h2>\n

  memcpy\u51fd\u6570\u662f\u4e00\u4e2a\u9ad8\u6548\u7684\u5185\u5b58\u590d\u5236\u51fd\u6570\uff0c\u5b83\u7684\u6267\u884c\u901f\u5ea6\u53d6\u51b3\u4e8e\u590d\u5236\u7684\u5185\u5b58\u5927\u5c0f\u3002\u4e00\u822c\u6765\u8bf4\uff0cmemcpy\u7684\u6267\u884c\u901f\u5ea6\u6bd4\u5176\u4ed6\u590d\u5236\u5185\u5b58\u7684\u65b9\u6cd5\u8981\u5feb\u5f97\u591a\u3002\u5b83\u53ef\u4ee5\u5728\u51e0\u5fae\u79d2\u5185\u5b8c\u6210\u590d\u5236\uff0c\u8fd9\u53d6\u51b3\u4e8e\u590d\u5236\u7684\u5185\u5b58\u5927\u5c0f\u3002<\/p>\n

  memcpy\u7684\u6267\u884c\u901f\u5ea6\u53d7\u5230\u591a\u79cd\u56e0\u7d20\u7684\u5f71\u54cd\uff0c\u5176\u4e2d\u5305\u62ec\u590d\u5236\u7684\u5185\u5b58\u5927\u5c0f\u3001\u5904\u7406\u5668\u7684\u901f\u5ea6\u3001\u7f13\u5b58\u5927\u5c0f\u7b49\u3002\u5982\u679c\u590d\u5236\u7684\u5185\u5b58\u8f83\u5c0f\uff0c\u5219memcpy\u7684\u6267\u884c\u901f\u5ea6\u4f1a\u66f4\u5feb\u3002\u53e6\u5916\uff0c\u5904\u7406\u5668\u7684\u901f\u5ea6\u8d8a\u5feb\uff0cmemcpy\u7684\u6267\u884c\u901f\u5ea6\u4e5f\u4f1a\u66f4\u5feb\u3002\u6b64\u5916\uff0c\u7f13\u5b58\u7684\u5927\u5c0f\u4e5f\u4f1a\u5f71\u54cdmemcpy\u7684\u6267\u884c\u901f\u5ea6\uff0c\u5982\u679c\u7f13\u5b58\u8d8a\u5927\uff0cmemcpy\u7684\u6267\u884c\u901f\u5ea6\u4e5f\u4f1a\u66f4\u5feb\u3002<\/p>\n

\u5982\u4f55\u4f7f\u7528memcpy<\/h2>\n

  memcpy\u51fd\u6570\u7684\u4f7f\u7528\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u8c03\u7528\u51fd\u6570\uff0c\u6307\u5b9a\u8981\u590d\u5236\u7684\u5185\u5b58\u5927\u5c0f\u5373\u53ef\u3002\u4e0b\u9762\u662fmemcpy\u51fd\u6570\u7684\u4e00\u4e2a\u7b80\u5355\u793a\u4f8b\uff1a<\/p>\n

  void *memcpy(void *dest, const void *src, size_t n);<\/p><\/pre>\n

  \u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0cdest\u53c2\u6570\u662f\u6307\u5411\u76ee\u6807\u5185\u5b58\u7684\u6307\u9488\uff0csrc\u53c2\u6570\u662f\u6307\u5411\u6e90\u5185\u5b58\u7684\u6307\u9488\uff0cn\u53c2\u6570\u662f\u8981\u590d\u5236\u7684\u5b57\u8282\u6570\u3002<\/p>\n

  memcpy\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u590d\u5236\u5185\u5b58\uff0c\u56e0\u6b64\u53ef\u4ee5\u7528\u4e8e\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528memcpy\u51fd\u6570\u6765\u590d\u5236\u5927\u578b\u6570\u7ec4\uff0c\u800c\u4e0d\u5fc5\u4f7f\u7528\u5faa\u73af\u6765\u5b8c\u6210\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  memcpy\u51fd\u6570\u662f\u4e00\u79cd\u9ad8\u6548\u7684\u590d\u5236\u5185\u5b58\u7684\u65b9\u6cd5\uff0c\u5b83\u7684\u6267\u884c\u901f\u5ea6\u53d6\u51b3\u4e8e\u590d\u5236\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u5904\u7406\u5668\u901f\u5ea6\u548c\u7f13\u5b58\u5927\u5c0f\u3002<\/strong>\u4f7f\u7528memcpy\u51fd\u6570\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\uff0c\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u590d\u5236\u5927\u578b\u6570\u7ec4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

memcpy\u51fd\u6570\u662f\u4e00\u4e2aC\u8bed\u8a00\u6807\u51c6\u5e93\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u4e00\u5757\u5185\u5b58\u4e2d\u7684\u6570\u636e\u590d\u5236\u5230\u53e6\u4e00\u5757\u5185\u5b58\u4e2d\u3002\u5b83\u662f\u4e00\u79cd\u9ad8\u6548\u7684\u590d\u5236\u5185\u5b58\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u66f4\u5feb\u5730\u5b8c\u6210\u4efb\u52a1\u3002\u672c\u6587\u5c06\u8ba8\u8bbamemcpy\u51fd\u6570\u7684<\/p>\n","protected":false},"author":1,"featured_media":1839,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-59639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts\/59639"}],"collection":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/comments?post=59639"}],"version-history":[{"count":0,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts\/59639\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/media\/1839"}],"wp:attachment":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/media?parent=59639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/categories?post=59639"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/tags?post=59639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}