| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 694 人关注过本帖
标题:求助 有个技术问题解决不了
取消只看楼主 加入收藏
aiwoleilei
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2010-6-22
结帖率:60%
收藏
已结贴  问题点数:16 回复次数:2 
求助 有个技术问题解决不了
主要问题是:输入选项后程序就结束了,不能返回重新选择输入项,不知道什么地方有问题,谁能帮我解决一下,谢谢啦!!!
cout<<"****************************************"<<endl;
    cout<<"1   生成准考证号"<<endl;
    cout<<"2   显示所有考生的考试信息"<<endl;
    cout<<"3   按考场号显示考生的信息"<<endl;
    cout<<"4   结束程序"<<endl;
    cout<<"****************************************"<<endl;
    cout<<"请输入选项:"<<'\n';
    cin>>xuan;
    switch(xuan)
    {
    case 1:cout<<"已生成准考证号"<<endl;
        return;
    case 2:
        {
            cout<<"学号   姓名   准考证号   考场号   座位号"<<endl;
            for(i=0;i<n;i++)
            cout<<stu[i].num<<'\t'<<stu[i].name<<'\t'<<stu[i].testID<<'\t'<<stu[i].testID[0]<<stu[i].testID[1]<<'\t'<<stu[i].testID[9]<<stu[i].testID[10]<<endl;
        }
        return;
    case 3:
        {
            cout<<"请输入考场号 :";
                cin>>q;
                cout<<"学号   姓名   准考证号   考场号   座位号"<<endl;
                for(i=(q-1)*m;i<q*m;i++)
                    cout<<stu[i].num<<'\t'<<stu[i].name<<'\t'<<stu[i].testID<<'\t'<<stu[i].testID[0]<<stu[i].testID[1]<<'\t'<<stu[i].testID[9]<<stu[i].testID[10]<<endl;
        }return;
    case 4:cout<<endl;break;

   
}
搜索更多相关主题的帖子: 问题解决 技术 
2010-06-25 12:44
aiwoleilei
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2010-6-22
收藏
得分:0 
能解释一下while(1)
是什么意思吗?我是初学者,还不太懂
2010-06-25 13:02
aiwoleilei
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2010-6-22
收藏
得分:0 
嗯,谢谢!
2010-06-26 18:39
快速回复:求助 有个技术问题解决不了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016812 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved