这是我的代码的一个例外
多边形.h
#include "gf.h"
typedef struct polynome {
int deg, size;
gf_t * coeff;
} * poly_t; /* polynomial has coefficients in the finite field */
class Polinomio{
public:
int poly_degppf(poly_t g);
聚.cpp
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gf.h"
#include "poly.h"
Polinomio::Polinomio(int n){
printf("Hola como estas");
}
int Polinomio::poly_degppf(poly_t g) {
int i, d, res;
poly_t *u;
d = poly_deg(g);
u = malloc(d * sizeof (poly_t*));
为什么我会收到此错误?
poly.cpp: In member function ‘int Polinomio::poly_degppf(polynome*)’:
poly.cpp:261: error: invalid conversion from ‘void*’ to ‘polynome**’