33,321
社区成员




[list]
item_no=4
item0 = 0, 0, 0,
item1 = 200, 1, 0, \B003\C048008\fk3232\c255000000000\S05\s000255000000hi, 你好
item2 = 30, 4, 3, \ct\b255255000000\C000008abc
item3 = 500, 20, 5, \N02
for(i=0;i<item_no;i++)
{
item[i]=GetPrivateProfileString(lpSection,lpKey,lpValue,/*这里怎么写?*/,iBufferSize,lpPath);
}
// 读出有多少item
int num_items = read_item_number();
// 分配空间
int* store = (int*) malloc( 3 * num_items * sizeof(int) );
// 读出每个item
int a,b,c;
for (int i=0; i<num_items; i++) {
read_next_item( &a, &b, &c );
store[3*i] = a;
store[3*i+1] = b;
store[3*i+2] = c;
}
char str[255];
for(i=0;i<item_no;i++)
{
sprintf(str,"item%d",i);
item[i]=GetPrivateProfileString(lpSection,lpKey,lpValue, str,iBufferSize,lpPath);
}