首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

数目字‘e'的输入

2013-01-17 
数字‘e'的输入作为数字的e,输入后,编译出现错误:第一次出现e”没有定义“e,怎么办?[解决办法]doubl

数字‘e'的输入
作为数字的"e",输入后,编译出现错误:第一次出现"e”没有定义“e",怎么办?
[解决办法]
double e = 2.718281828;
[解决办法]
是数学上log运算的e吗?如果是,引用math.h里面的宏,如下:
#define M_E     2.7182818284590452354   /* e */ 
或者自己定义.
[解决办法]
# define M_El2.7182818284590452353602874713526625L  /* e */
[解决办法]

File: "c:\Microsoft SDK\src\crt\math.h" 2 occurrences found on 2 lines
   141:  * M_E        - e
   156: #define M_E        2.71828182845904523536
File: "C:\Program Files\Microsoft Visual Studio 8\VC\include\math.h" 2 occurrences found on 2 lines
   606:  * M_E        - e
   621: #define M_E        2.71828182845904523536
File: "C:\Program Files\Microsoft Visual Studio 9.0\VC\include\math.h" 2 occurrences found on 2 lines
   606:  * M_E        - e
   621: #define M_E        2.71828182845904523536
File: "C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h" 2 occurrences found on 2 lines
   612:  * M_E        - e
   627: #define M_E        2.71828182845904523536

热点排行