"complex" has already been declared in the current scope
请问一下这是什么问题"Mymath.h", line 15: error: "complex" has already been declared in the current scope。应该怎么解决,代码如下
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#define TINY 1.0e-20
#define FREE_ARG char*
#define PI 3.1415926
typedef struct
/*定义复数结构体*/
{
double real ;
double imag ;
}complex;
double Cabs(complex a)
/*求复数的绝对值*/
{
double c;
c=sqrt(a.real*a.real+a.imag*a.imag);
return c;
}
complex Cadd(complex a,complex b)
/* 复数加法*/
{
complex c;
c.real=a.real+b.real;
c.imag=a.imag+b.imag;
return c;
}
这个是Mymath.h中的文件,请问一下这个应该怎么弄?