unsigned char buff1[128]={'a','b','c','d','e','f'}; //数组初始化前6位,后面默认为0 unsigned char buff2[128]={}; //数组初始化默认为0,创建数组必须初始化 memcpy(buff2,buff1+2,3); //将数组buff1内容拷贝到buff2中,buff1中第2位(0位、1位)开始的后三个复制到buff2中。
Copyright © 2024 yacbo Powered by .NET 8.0 on Kubernetes