| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 525 人关注过本帖
标题:VC6.0问题求助
取消只看楼主 加入收藏
viptel
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2010-6-8
结帖率:100%
收藏
 问题点数:0 回复次数:1 
VC6.0问题求助
我自己写了一个程序要求用户输入一个字符就进行下一步接着在输入一个数字在进行一步,在vc6.0编译器上可以正常工作(WIN32 Debug),当是我把它组建成Release后问题就出现。开始输入字符可以到达下一步。可是当输入一个整数时就不能工作了。整个程序都结束自行关闭了。请问高手们,原因是什么啊?
#include"stdio.h"

int main()
{   
    int b;
    char a;

   
  
    while(scanf("%c",&a)==1)
{
printf("                             \n");
printf("\t   Happy birthday!\n");
printf("                                \n");
printf(" \t\t送个蛋糕你许个愿~~(*^__^*)                      \n  ");
printf("                              \n  ");
   printf("             iiiiiiiiii \n");
   printf("             |:H:a:p:p:y:|\n");
printf("           __|___________|__\n");
printf("          |^^^^^^^^^^^^^^^^^|\n");
printf("          |:B:i:r:t:h:d:a:y:|\n");
printf("          |                 |\n");   
printf("         ~~~~~~~~~~~~~~~~~~~~~ \n");

    printf("                \n");
printf("\t       ..------..\n");   
printf("        /~~-.-~__-'`-__  ~-.  .-~-.\n");
printf("       |   /~~~\\     / ~~---\\|    |\n");
printf("       |  ||| * |   | | |  * |    |\n");      
printf("       /_-|\ \ /     \ \ \__.|\.  |\n");
printf("        ~   \~~   |_|   ~~~~ /   ~-.\\ \n");      
       printf("          ~-.._      _.-~~ \n");         
       printf( "            .--~~~~~~--.\n");
       printf("           |  |______|  | \n");            
        printf("            ~-|______|-~ \n");         
        printf("              |      |  \n ");        
        printf("             |______| \n");         
        printf ("              |  |   |   \n" );      
        printf("              |__|___|  \n" );
        printf("              |_|| _|| \n");
       printf("              `--'`--' \n");
printf("                                \n");

break;
  
}

   scanf("%d",&b);
   switch(b)
   {
   case 0:
   case 1:
   case 2:
   case 3:            
   case 4:            
   case 5:
   case 6:        
   case 7:
   case 8:
   case 9:
                      printf("送首诗你~~(*^__^*)\n ");
              printf("                                  \n");
                      printf("    \" 念恩爱厚深,\"\n");
              printf("                                  \n");
                      printf("    \" 刘阮辞世尘.\"\n");
              printf("                                  \n");
                      printf("    \" 文彩成礼乐,\"\n");
              printf("                                  \n");
                      printf("    \" 华池落彩云.\"\n");
  printf("                                  \n");

  printf("                                  \n");break;
   default:printf("→→想偷蕃薯啊~~~o(∩_∩)o   \n");
   }
   printf("                                    \n");
   
   
        printf("         训觉觉咯~~~~希望你钟意  (*^__^*)  \n");
         printf("                                    \n");
  printf("\t(按任意键退出程序)\n");

return 0;

}
搜索更多相关主题的帖子: include 下一步 编译器 用户 
2010-06-11 14:33
viptel
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2010-6-8
收藏
得分:0 
回复 2楼 debroa723
谢谢啦~~不过我已经解决了
2010-06-12 18:58
快速回复:VC6.0问题求助
数据加载中...
 
   



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

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