编译程序时会出现各种警告,软件发布时须关闭
1 C++从大范围的书转为小范围的数时就会有警告信息,如:
int i = 10;
double d = 10.2;
i = d + i;
cout << i << endl;
改为下面就好了:
int i = 10;
double d = 10.2;
i = (int)d + i;
cout << i << endl;
编译程序时会出现各种警告,软件发布时须关闭
1 C++从大范围的书转为小范围的数时就会有警告信息,如:
int i = 10;
double d = 10.2;
i = d + i;
cout << i << endl;
改为下面就好了:
int i = 10;
double d = 10.2;
i = (int)d + i;
cout << i << endl;