0

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

Edited by james6754: n/a

2
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by thines01
0

Hi thines

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

0

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?

0

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

Just when assigning to 'ptr' gives me an error

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.