编译没错,运行时出错!求解!
#include<stdio.h>int main()
{
void actionl(int,int),action2(int,int);
char ch;
int a=15,b=23;
ch=getchar();
switch (ch)
{
case 'a':
case 'A': actionl(a,b);break;
case 'b':
case 'B':action2(a,b);break;
default:putchar('\a');
}
return 0;
}
void action1(int x ,int y)
{
printf("x+y=%d\n",x+y);
}
void action2(int x,int y)
{
printf("x*y=%d\n",x*y);
}
//---------------------------------------------------
--------------------Configuration: switch处理简单菜单语句 - Win32 Debug--------------------
Linking...
switch处理简单菜单语句.obj : error LNK2001: unresolved external symbol _actionl
Debug/switch处理简单菜单语句.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
switch处理简单菜单语句.exe - 1 error(s), 0 warning(s)
点解点解?