做一个实时数据库的存储结构。
我用for(int i = 0; i < 6; i++)
{
Page_entry[i] = new BYTE[512 * 1024];
}
在内存中分配了六个512k大小的页面,我现在想往这块区域里写入纪录!
Machine{ int number;
bool status;
..........
} 记录依次逐条存放下去
苦死我了~~~~~~~~~ vc菜鸟
我用for(int i = 0; i < 6; i++)
{
Page_entry[i] = new BYTE[512 * 1024];
}
在内存中分配了六个512k大小的页面,我现在想往这块区域里写入纪录!
Machine{ int number;
bool status;
..........
} 记录依次逐条存放下去
苦死我了~~~~~~~~~ vc菜鸟
struct _temp{BYTE b[512 * 1024]}temp[6];写时:
temp[0].b;
temp[1].b
……
2.用BYTE[][]也可
Page_entry = new BYTE *[6];
for(int i = 0; i < 6; i++)
{
Page_entry[i] = new BYTE[512 * 1024];
}
Page_entry[1][*++]
Page_entry[2][*++]
....