库函数的调用(dos.h)
程序:#include<dos.h>
#include<stdio.h>
char fun(void)
{
char cur;
cur=bdos(0x19,0,0);
return('A'+cur);
}
int main()
{
printf("%c\n",fun());
return 0;
}
编译时出现的警告
warning C4013: 'bdos' undefined; assuming extern returning int
链接时出现错误
bdos.obj : error LNK2001: unresolved external symbol _bdos
Debug/bdos.exe : fatal error LNK1120: 1 unresolved externals