"return type may not be specified on a constructor"
I am getting this error in VS10. Here's my code: (the error appears on the word class)
ComplexNumDec.h
class ComplexNum{
private:
double real;
double imag;
public:
ComplexNum(double x, double y);
~ComplexNum();
ComplexNum operator+(ComplexNum x);
ComplexNum operator-(ComplexNum x);
ComplexNum operator*(ComplexNum x);
}
I also have a file ComplexNum.h which fleshes out those functions. Here is my function for the constructor:
ComplexNum::ComplexNum(double x, double y){
real = x;
imag = y;
}
I have a main.cpp file too.
Can anyone explain why I am getting the error:
"return type may not be specified on a constructor"