可以在不包含指令"math.h"的情况下使用C ++数学函数.在VS 2013中 [英] C++ math functions can be used without including the directive "math.h" in VS 2013
本文介绍了可以在不包含指令"math.h"的情况下使用C ++数学函数.在VS 2013中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我很好奇为什么我可以在C ++中使用数学函数而不包含"math.h".我用Google搜索找不到答案.
I am very curious why I can use the math functions in C++ without including the "math.h". I can't find an answer with google search.
这是我正在执行的简单代码.一切都在编译并运行.
Here is the simple code I am executing. Everything is compiling and running.
#include <iostream>
using namespace std;
int main()
{
const float PI = acosf(-1);
cout << PI << endl;
return 0;
}
推荐答案
任何标准标头都可以包含任何其他标准标头.
Any standard header is allowed to include any other standard header.
这篇关于可以在不包含指令"math.h"的情况下使用C ++数学函数.在VS 2013中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文