title: C++ in-class initialization of static data member
body: <p>I am trying to make a class for these two variables(window, windowSurface) so I can access them in different areas of my code. My error is:</p>
  
  <pre><code>include/windowSurface.h|11|error: field initializer is not constant|
  include/windowSurface.h|11|error: in-class initialization of static data member ‘SDL_Window windowSurface::window’ of incomplete type
  </code></pre>
  
  <p>From the Code Below</p>
  
  <pre><code>#ifndef WINDOWSURFACE_H
  #define WINDOWSURFACE_H
  #include "SDL2/SDL.h"
  
  class windowSurface
  {
      public:
          windowSurface();
          virtual ~windowSurface();
          static SDL_Window window = SDL_CreateWindow( "Tetris", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_SHOWN );
          static SDL_Surface windowSurface = SDL_GetWindowSurface( window );
      protected:
      private:
  };
  
  #endif // WINDOWSURFACE_H
  </code></pre>
  
  <p>What am I doing wrong and how do I fix this?</p>