本文介绍了如果没有定义tgamma()函数怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用标准库中的 tgamma()
。当我尝试编译,我得到错误消息:
I am trying to use tgamma()
from the standard library. When I try to compile, I get the error message:
我有指令 #include< cmath>
。我使用Embarcadero C ++ Builder XE3,声称支持C ++ 11标准。可能是我的问题,以及如何解决?
I have the directive #include <cmath>
. I use Embarcadero C++ Builder XE3, which claims to support C++11 standards. What could be my problem, and how to fix it?
推荐答案
包含。
#include <boost/math/special_functions/gamma.hpp>
...
double rootPi = boost::math::tgamma<double>(0.5);
当然,你可以随时切换到不同的编译器,例如 gcc 。
Of course, you can always switch to a different compiler, like gcc.
这篇关于如果没有定义tgamma()函数怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!