小猪猪 发表于 2006-7-7 09:44

如何将程序加入菜单?

我的菜单程序是这样的!
/*菜单选择*/
#include<stdio.h>
#include<stdlib.h>
#include <conio.h >
#include <math.h >
#include<time.h>
choose()
{        int queen;
        char k;
        clrscr();
        printf("1.N Queen\n2.HASH\n3.Insert Sort\n4.Bub Sort\n5.Quit\nPlease choose one:\n");
        do
        {
                k=getch();
        }while(k<'1'||k>'5');
        if(k=='1')
        {
                clrscr();
                printf("Please enter the number of the queen");
                scanf("%d",&queen);
                getchar();
                nextput(1);
                printf("\nput any key to back menu...");
                getch();
                choose();
        }
        if(k=='2')
                hash();
        if(k=='3')
                bubsort();
        if(k=='4')
                insertsort();
        if(k=='5')
                exit(-1);       
}

/*主函数*/
main()
{
        choose();
}
会出现这样的错误 undefined reference to `clrscr' 后面没有定义的都有这错误!我要怎么把写好的hash bubsort等的程序加到菜单能实现菜单选择功能!
我用的是DEV-CPP!
页: [1]
查看完整版本: 如何将程序加入菜单?