title: error: invalid use of non-static data member
body: <pre><code>class Stack
  {               
  private:
  
      int tos;
      const int max = 10;    
      int a[max];
  public:
  
      void push(int adddata);
      void pop();
      void printlist();
  };
  </code></pre>
  
  <p>error: invalid use of non-static data member 'max'</p>
  
  <p>whats wrong in the code, and please help me with proper correction. 
  Thankyou </p>