lookup table in c

前端 未结 4 2078
误落风尘
误落风尘 2021-01-03 00:58

I\'m creating a lookup table in C When I define this:

typedef struct {
 char* action;
 char* message;
} lookuptab;

lookuptab tab[] = {
  {\"aa\",\"bb\"},
           


        
4条回答
  •  北海茫月
    2021-01-03 01:25

    I think you have to specify the array size to use the struct in another array:

    typedef struct {
     char* action;
     char* message[2];
    } lookuptab;
    

提交回复
热议问题