迷失在这部分代码上。
const struct editor_cmd_type editor_table[] =
{
/* { command function }, */
{ "area", do_aedit },
{ "room", do_redit },
{ "object", do_oedit },
{ "mobile", do_medit },
{ "mpcode", do_mpedit },
{ "hedit", do_hedit },
{ NULL, 0, }
};
我遇到的错误:
olc.c:652: error: âdo_aeditâ was not declared in this scope olc.c:653: error: âdo_reditâ was not declared in this scope olc.c:654: error: âdo_oeditâ was not declared in this scope olc.c:655: error: âdo_meditâ was not declared in this scope olc.c:656: error: âdo_mpeditâ was not declared in this scope olc.c:657: error: âdo_heditâ was not declared in this scope make: *** [olc.o] Error 1
代码中已经有 void do_aedit
、void do_redit
等...我还缺少什么?
最佳答案
你说代码中定义了 void do_aedit 等,但从编译器错误来看,这些似乎在文件 olc.c 中未定义(显示的代码可能在其中)。函数是否在显示的代码之前声明?如果它们在另一个文件中,是否包含在内?
关于c++ - do_ 未在此范围内声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1329934/