#include<iostream>
using namespace std ;
int main()
{
for(float x=0; x<=1.0; x=x+0.1)
cout<<x<<\",\";
cout<<endl;
bool m = (x<=1.0) ;
cout << \"x = \" << x << endl ;
cout.setf(ios_base::boolalpha) ;
cout << \"x<=1.0 \" << m << endl ;
bool n = (1<=1.0);
cout << \"1<=1.0 \" << n << endl ;
return 0 ;
}
版主这么一说,偶又发现了有意思的....但是怎么解释呢?
运行这个感觉不深入了解c++会有很多头疼的事情...
[此贴子已经被作者于2007-1-27 22:28:42编辑过]
work~work