头文件 #include <string.h>
#include <stdio.h>
#include <string.h>
typedef struct{
size_t x;
size_t y;
}place;
int main()
{
place a={1,2};
place b;
memcpy(&b,&a,sizeof(place));
printf("(%zu,%zu)\n",b.x,b.y);
}
输出:
(1,2)
Program ended with exit code: 0