c++结构体数据转为数组
struct DATA_INFO{
int a;
CString strName;
};
DATA_INFO datainfo;
datainfo.a = 12;
datainfo.strName = L"com";
char *buf = new char;
ZeroMemory(buf, 1024);
memcpy(buf, (char*)&datainfo, sizeof(datainfo));
文档来源:51CTO技术博客https://blog.51cto.com/u_10486491/3215398
页:
[1]