有没有办法确定message
以下查找表中的元素数量,还是我需要int size
在结构中明确包含一个?
typedef struct {
int enable;
char* message[3];
} lookuptable;
lookuptable table[] = {
{1, {"Foo", "Bar", "Baz"}}, // # 3
{1, {"Foo", "Bar"}}, // # 2
{1, {"Foo"}}, // # 1
{1, {"Foo", "Baz"}}, // # 2
};