I have put my code in to separate classes instead of having it just inside one class.

Here is my constructor, I have also included my file which defines the class (#include "Matrix.h")

Matrix::Matrix(int* m,int* n)//constructor takes two ints
			{
				M = (*m);
				N = (*n);
				this->ptr = new double[M * N];	
				assign(&M,&N);//call function
			}

So 'ptr' is declared in "Matrix.h".

Now, when I try to assign this memory to 'ptr' it doesn't let me.

The error I get is "There is no source code available for the current location"

Any ideas why? And a bit of an explanation would be nice is poss :-)
It is only since putting my code is separate class files.
Thanks

Are M and N also integers or matrices of a particular size?

Hi thines

No M and N are integers...I don't quite understand what is going on...

What values do they ACTUALLY contain when assigned by (*m) and (*n)?
Have you looked at this in debug mode to see if they contain the values you expect?

Yes, they definitely contain the correct values....

Just when assigning to 'ptr' gives me an error

What error does it give and what is the data type of ptr?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.