title: C++: a nonstatic member reference must be relative to a specific object
body: <p>I've seen a number of posts on this but they all seem to be addressing when spme sort of method is defined. </p>
  
  <p>Background for app: Just trying to make a basic Sudoku game to get the hang of C++.</p>
  
  <p>The error seems independent of the main function .cpp file, so I'll ignore it unless it's requested to keep the explanation short.</p>
  
  <p>The board.h file:</p>
  
  <pre><code>#pragma once
  class board
  {
  public:
      board(int gameSize, int diffifuclty) : gameSize(gameSize), difficulty(difficulty) {};
      ~board();
  
  private:
      int gameSize; int difficulty;
      int game[gameSize][gameSize][gameSize][gameSize];
      void createRandom(); // Creates a random workable board.
      void hasSolution(); // Checks if there's a solution from the current state.
  
  };
  </code></pre>
  
  <p>I haven't toyed much with the board.cpp file yet, as I  was just busy defining everything in the board.h file to plan out what functions I want to write. </p>
  
  <p>Anyways, I want to have a game board with <code>gameSize</code> and <code>difficulty</code> being inputted in the console. I'm getting the error mentioned in my title when I try to construct the multidimensional array for the game board. (So with Sudoku, the 9x9 game has game size 3 here.)</p>
  
  <p>I'm not sure what the error is or how to make this array an attribute (I'm not sure if this is C++ terminology, so sorry) of board? </p>