- 论坛徽章:
- 0
|
struct cmd_info {
char * cmd;
void (*fun)();
};
static cmd_info cmd_list[] = {
{"open", do_open},
{"close", do_close},
{"save", do_save},
{"quit", do_quit},
{NULL, NULL}
};
这样定义,为什么报错啊
'initializing' : cannot convert from 'char [5]' to 'struct cmd_info'
No constructor could take the source type, or constructor overload resolution was ambiguous
error C2440: 'initializing' : cannot convert from '' to 'struct cmd_info'
No constructor could take the source type, or constructor overload resolution was ambiguous |
|