Hi everyone,
First of all I'm pretty sure I'm not the first one to get this error but every similar thread I found either didn't get me an answer or wasn't relevant enough.
So, why not try creating my own thread?
In some obscure Financial Engineering class, I have to use different math transforms (some using fft).
In order to make it work I had to create two classes: Complex and Options.
The first time I ran my code, in order to test the methods within the classes, everything worked fine. But now, everytime I build, I get a Semantic Issue - Redefinition of 'Complex' // 'Options'.
Then XCode points out the fact I included the header files in other .cpp // .h files and they tell me the previous definitions are there.
I really don't get what I should do!
BTW, I'm under Snow Leopard and using XCode 4.0.1
Below my header for one of my classes, and I'm #includ-ing it in several other files.
Thanks!
First of all I'm pretty sure I'm not the first one to get this error but every similar thread I found either didn't get me an answer or wasn't relevant enough.
So, why not try creating my own thread?
In some obscure Financial Engineering class, I have to use different math transforms (some using fft).
In order to make it work I had to create two classes: Complex and Options.
The first time I ran my code, in order to test the methods within the classes, everything worked fine. But now, everytime I build, I get a Semantic Issue - Redefinition of 'Complex' // 'Options'.
Then XCode points out the fact I included the header files in other .cpp // .h files and they tell me the previous definitions are there.
I really don't get what I should do!
BTW, I'm under Snow Leopard and using XCode 4.0.1
Below my header for one of my classes, and I'm #includ-ing it in several other files.
Thanks!
Code:
class Complex {
public:
Complex(float realpart=0, float imaginarypart=0);
Complex Add(const Complex &c) const;
float GetReal() const;
float GetImaginary() const;
void SetReal(float r);
void SetImaginary(float i);
void fft(double* x);
Complex Multiply(const Complex &a) const;
Complex power(float p) const;
float norm() const;
Complex coshC() const;
Complex sinhC() const;
Complex cothC() const;
float arg() const;
Complex expComplex() const;
void outprint() const;
private:
float real;
float imaginary;
};