void test_memcpy() {
uint32 a = 1235439534;
char buf[1024];
memset(buf, 0 , sizeof(buf));
memcpy(buf, &a, sizeof(a));
cout << buf << endl;
uint32 b = 0;
memcpy(&b, buf, sizeof(b));
cout << b << endl;
}
将数字序列化到内存
最新推荐文章于 2024-07-30 16:40:00 发布