- #1
NeoDevin
- 334
- 2
Hi, I have a matrix class which I defined myself constructor is:
I try to call it using:
Where NX, NY, NU, NV are all declared as global variables of type unsigned, which have their values set prior to this. It gives me this error message:
Anyone have any ideas how to fix this?
Thanks in advance.
Code:
Matrix::Matrix(unsigned s1, unsigned s2, unsigned s3, unsigned s4)
{
s1_ = s1; s2_ = s2; s3_ = s3; s4_ = s4;
data_ = new double[s1*s2*s3*s4];
}
I try to call it using:
Code:
Matrix field(NX,NY,NU,NV);
Where NX, NY, NU, NV are all declared as global variables of type unsigned, which have their values set prior to this. It gives me this error message:
Code:
/tmp/cc06NW6n.o: In function `main':
solve.cpp:(.text+0x137d): undefined reference to `Matrix::Matrix(Matrix const&)'
collect2: ld returned 1 exit status
Anyone have any ideas how to fix this?
Thanks in advance.