title: Invalid use of non static data member
body: <pre><code>class matrix
  {
     public:
       int m;
       int n;
       int mat[m][n];
  };  
  </code></pre>
  
  <p>I get this error: </p>
  
  <blockquote>
    <p>[Error]: Invalid use of non static data member 'matrix::n'<br>
    On declaring static:</p>
  </blockquote>
  
  <pre><code>class matrix
  {
     public:
       static int m;
       static int n;
       int mat[m][n];    //Error
  };  
  </code></pre>
  
  <p>I get this error:  </p>
  
  <blockquote>
    <p>[Error]: Array bound is not an integer constant before ']' token<br>
    Please tell me what these errors mean and how to fix this problem.  </p>
  </blockquote>