实用技巧之while里面使用getchar或sleep函数

Posted nowroot

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了实用技巧之while里面使用getchar或sleep函数相关的知识,希望对你有一定的参考价值。

                                   我们经常需要打印一些变量的取值来调试程序,使用while(1)是常用的手段。

                                  

              while (1)
        {
            char letter = getchar();
            printf("test_point is %d 	
", test_point);
            printf("test_point is %f 	
", test_point);
            //printf("右移一些位数%d 	
", (test_point & 0xff00) >> 16);
            //printf("hello world
");
            //scanf("%d", &normal_point);
            printf(" letter is %c
", letter);
        }




                 while (1)
        {
        
            printf("test_point is %d 	
", test_point);
            printf("test_point is %f 	
", test_point);
            Sleep(1000);
        }

 

                                    

 

以上是关于实用技巧之while里面使用getchar或sleep函数的主要内容,如果未能解决你的问题,请参考以下文章