0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

C++ Builder 10.2 Tokyo > E2015 'std::pow(long double, int)'と'std::pow(double, int)'の区別が曖昧 > 対処

Posted at
動作環境
Rad Studio 10.2 Tokyo

XE4で実装していたプロジェクトを10.2 Tokyoでビルドしようとしたら、以下のエラーとなった。

E2015 'std::pow(long double, int)'と'std::pow(double, int)'の区別が曖昧

関連コードでは以下の計算を使っている。
ここで、pwrは変数名。

pow(10, pwr)

対処

以下のようにコードを変更した (小数点の追加)。

pow(10., pwr)

これによりdouble型として認識されるようになり、「曖昧」でなくなった。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?