如何在 Visual C++ 2008 中访问数学常量(例如 M_PI)? [英] How do I access math constants (eg. M_PI) in Visual C++ 2008?

查看:48
本文介绍了如何在 Visual C++ 2008 中访问数学常量(例如 M_PI)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Visual C++ 2008 中使用数学常量,例如 M_PI 和 M_E.我假设它们是在 cmath 标头中定义的.

I want to use the math constants, such as M_PI and M_E, in Visual C++ 2008. I assumed they were defined in the cmath header.

推荐答案

它们是,但您还需要在 #include <cmath>

这篇关于如何在 Visual C++ 2008 中访问数学常量(例如 M_PI)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆