What does the above error mean? I have typdef Coeffs as double and I'm trying to use it in func1
Line 18: Poly --> expression must have pointer to object type
Code:
typedef double Coeffs;
int main()
{
Coeffs Poly;
...
}
func1(Coeffs Poly, int num_verts, double*coeff)
{
double A, B, C, D;
int i, j;
A = B = C = D = 0;
for(i=0;i<num_verts;i++)
{
j = (i+1) % num_verts;
A += ((Poly[j][1] - Poly[i][1]) * (Poly[i][2] + Poly[j][2]));
B += ((Poly[j][2] - Poly[i][2]) * (Poly[i][0] + Poly[j][0]));
C += ((Poly[j][0] - Poly[i][0]) * (Poly[i][1] + Poly[j][1]));
}
}