我是 C++ 新手,使用经典的 Borland Turbo C++
图形初始化后,当我按以下方式使用 printf 时,它显示值 0。但是当我使用 cout 时,显示正确的值
float x=10;
printf("%d",x); // displays 0
cout<<x; // displays 10
我是 C++ 新手,使用经典的 Borland Turbo C++
图形初始化后,当我按以下方式使用 printf 时,它显示值 0。但是当我使用 cout 时,显示正确的值
float x=10;
printf("%d",x); // displays 0
cout<<x; // displays 10