#include "stdafx.h"
int main(void)
{
/*定义变量*/
int i1=2; //定义整型变量
float f1=2.3; //定义浮点型变量
double d1=2.3; //定义双精度型变量
/*隐式类型转换*/
f1=i1+f1+d1; //先类型提升,再类型降级
cout<<f1<<endl;
return f1;
}
----------------Configuration: 255 - Win32 Debug--------------------
Compiling...
255.cpp
e:\ccc\255\255.cpp(3) : fatal error C1083: Cannot open precompiled header file: 'Debug/255.pch': No such file or directory
Error executing cl.exe.
255.obj - 1 error(s), 0 warning(s) |