使いたいです<cmath>
。私が行った場合:
#include <cmath>
エラーメッセージが表示されます:
「含まれるファイル内」
ただし、<cma
(Netbeans で) ctrl+spacebar を入力して実行すると、利用可能なすべてのファイルcmath
が表示され、一覧表示されます (/usr/include/c++/4.7 にあります)。GUI エディター/インテリセンスがヘッダーの存在を認識する理由がわかりcmath
ませんが、「In File included from」というエラーが表示されます。
完全なエラー メッセージ:
In file included from /usr/include/c++/4.7/cmath:46:0,
from ../../Documents/FD/MyFile.h:4,
from ../../Documents/FD/MyFIle.cpp:1:
/opt/intel/include/math.h:27:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
make[2]: *** [build/Debug/GNU-Linux-x86/_ext/2009285305/MyFile.o] Error 1
make[2]: Leaving directory `/home/me/NetBeansProjects/Project'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/me/NetBeansProjects/Project'
これらは私のインクルードディレクトリです:
/opt/インテル/インクルード;
/usr/include/boost;
/usr/include
編集(クリスの場合):
#ifndef MYFILE_H
#define MYFILE_H
#include <cmath>
class MyFile{
public:
static double doesntmatter(double x, int y, double z);
private:
};
#endif