0

Hi guys!

I am trying to make an object oriented program for matrix addition, but I am stuck right at the beginning.

I would like to have an 2D array as a class variable and another two class variables would define the arrays x and y coordinates.

Something like this:

```
class matrix
{
private:
int n;
int m;
int array[n][m];
};
```

With this code I am getting error:"invalid use of non-static data member matrix::n/m"

I have also tried to make a dynamic 2D array but it didnt work as well.

Is there a way how to do this? Thanks.