truncation from 'const double' to 'float'
堕落阿卡德 2010-12-19 04:19:51 程序是这样的:
#include<iostream>
using namespace std;
const float pi=3.14;
void main()
{
}
调试提示这个
warning C4305: 'initializing' : truncation from 'const double' to 'const float'
这是为什么?
系统为什么就默认3.14是double类型了?