我要显示汉子,根据汉字内码索引查询汉字编码的位置。想计算结构体长度,然结构体数组长度判断汉子编码的个数,查询总次数,返回汉字的行编码。
//以下.c文件
struct typFNT_GB24 code GB_24[] = // 数据表
{
"欢", 0x00,0x08,0x00,0x00,0x0E,0x00,0x00,0x0C,
0x00,0x00,0x0C,0x00,0x01,0x8C,0x00,0x7F,
0xD8,0x0C,0x01,0x9F,0xFE,0x01,0x90,0x0C,
0x01,0xA2,0x18,0x21,0xA3,0x90,0x13,0x43,
0x00,0x1B,0x03,0x00,0x0B,0x03,0x00,0x06,
0x03,0x00,0x06,0x06,0x80,0x07,0x06,0x80,
0x0D,0x86,0x80,0x19,0x8C,0x40,0x10,0xCC,
0x60,0x20,0x98,0x30,0x40,0x30,0x38,0x00,
0x60,0x1E,0x01,0x80,0x08,0x02,0x00,0x00
}
//以下.H文件
// ------------------ 汉字字模的数据结构定义 ------------------------ //
struct typFNT_GB24 // 汉字字模数据结构
{
signed char Index[2]; // 汉字内码索引
char Msk[72]; // 点阵码数据
};
extern struct typFNT_GB24 code GB_24[]; // 数据表
然后计算结构体总长度计算:UartSendStr("\r\nLEN:",sizeof(GB_24));
编译器警告:SP375.c(85): warning C198: sizeof returns zero
请问改如何解决?万分感谢!
|