我们经常需要打印一些变量的取值来调试程序,使用while(1)是常用的手段。
while (1) { char letter = getchar(); printf("test_point is %d \t\n", test_point); printf("test_point is %f \t\n", test_point); //printf("右移一些位数%d \t\n", (test_point & 0xff00) >> 16); //printf("hello world\n"); //scanf("%d", &normal_point); printf(" letter is %c\n", letter); } while (1) { printf("test_point is %d \t\n", test_point); printf("test_point is %f \t\n", test_point); Sleep(1000); }