So i have this complex class , and i want to have an 2d array of complex numbers this is part of the code not all the code
class Complex {
public:
/* construction/destruction */
Complex(double r, double i) { this->r = r; this->i = i; }
Complex() { r=0.0; i=0.0; }
~Complex() { r=0.0; i=0.0; }
/* operations */
Complex operator+(Complex &c) { return Complex( r+c.r, i+c.i ); }
double r, i;
};
int main()
{
const int HEIGHT = 256;
const int WIDTH = 256;
Complex G[HEIGHT][WIDTH];
}
so the line Complex G[HEIGHT][WIDTH]; is the line that causes the problem , any idea why ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…