让
gf.h
typedef unsigned short gf_t;
class GaloisField{
public:
gf_t * gf_exp;
gf_t * gf_log;
int gf_extension_degree, gf_cardinality, gf_multiplicative_order;
static gf_t gf_ord();
static int gf_inv(int x);
gf.cpp
gf_t GaloisField::gf_ord(){
return gf_multiplicative_order;
}
int GaloisField::gf_inv(int x){
return gf_exp[GaloisField::gf_ord() - gf_log[x]]; //line 181
}
我收到消息:gf.cpp:181: 错误:'gf_t' 和 'gf_t ()(gf_t)' 类型的无效操作数到二进制 'operator-'。为什么这个?