注册 登录
编程论坛 C++ Builder

求助!!!

iyth61525 发布于 2008-03-18 16:51, 1126 次点击
用VC++怎么运行不起来啊!!!
代码如下:
#include<stdio.h>
#include<string.h>
void main()
{
    for( ; ; )
    {    
        switch(menu_selsct())
    
        { case 1:
            printf("通讯录链表的建立\n");
            break;
          case 2:
            printf("通讯者结点的插入\n");
            break;
          case 3:
            printf("通讯者结点的查询\n");
            break;
          case 4:
            printf("通讯者结点的删除\n");
            break;
          case 5:
            printf("通讯录链表的输出\n");
            break;
          case 0:
            printf("再见!\n");
            break;
           return;
        }
    }
}
#include<stdio.h>
#include<string.h>
void main()
{
    for( ; ; )
    {    
        switch(menu_selsct())
    
        { case 1:
            printf("通讯录链表的建立\n");
            break;
          case 2:
            printf("通讯者结点的插入\n");
            break;
          case 3:
            printf("通讯者结点的查询\n");
            break;
          case 4:
            printf("通讯者结点的删除\n");
            break;
          case 5:
            printf("通讯录链表的输出\n");
            break;
          case 0:
            printf("再见!\n");
            break;
           return;
        }
    }
}
5 回复
#2
sunkaidong2008-03-18 16:53
menu_selsct()?函数呢?
#3
sunkaidong2008-03-18 18:54
#include<stdio.h>
#include<string.h>
int menu_select();
void main()
{  
    for( ; ; )
    {   
        switch(menu_select())
   
        { case 1:
            printf("通讯录链表的建立\n");
            break;
          case 2:
            printf("通讯者结点的插入\n");
            break;
          case 3:
            printf("通讯者结点的查询\n");
            break;
          case 4:
            printf("通讯者结点的删除\n");
            break;
          case 5:
            printf("通讯录链表的输出\n");
            break;
          case 0:
            printf("再见!\n");
            break;
           return;
        }
    }
}
int menu_select()
{
   int  sn;
   printf("通讯录管理系统\n");
   printf("****************\n");
   printf("1.通讯录链表的建立\n");
   printf("2.通讯者结点的插入\n");
   printf("3.通讯者结点的查询\n");
   printf("4.通讯者结点的删除\n");
   printf("5.通讯录链表的输出\n");
   printf("0.退出管理系统\n");
   printf("*****************\n");
   for( ; ; )
   {    scanf("%d",&sn);
        if(sn<0||sn>5)
            printf("输入错误,重选0-5\n");
        else
            break;
    }
    return sn;
}
#4
handongxue2008-03-25 14:53
主程序没错
是menu_selsct()函数出问题了
#5
sunkaidong2008-03-25 19:09
这是我第3次看见问这个程序的了。。。
#6
论坛元老2008-04-02 18:05
menu_selsct()?函数呢?
1