title: How to create a game window in microsoft visual studio c++
body: <p>I'm trying hard to create <a href="https://www.youtube.com/watch?v=cD3-NZzO2Ao" rel="nofollow noreferrer">this</a> project in C++, but I have no clue how to get this window to work (I get lost at about 16:00). I've got SDL working and all that, but I can't make main.cpp work. Here is my code:</p>
  
  <p><em>Graphics.h in header files</em></p>
  
  <pre><code>    #ifndef GRAPHICS_H
      #define GRAPHICS_H
  
      struct SDL_Window;
      struct SDL_Renderer;
  
      class Graphics {
      public:
          Graphics();
          ~Graphics();
      private:
          SDL_Window* _window;
          SDL_Renderer* _renderer;
      }; 
  
      #endif
  </code></pre>
  
  <p><em>Graphics.cpp under Source Files</em></p>
  
  <pre><code>#include &lt;SDL.h&gt;
  #include &lt;stdio.h&gt;
  #include "graphics.h"
  
  //Graphics Class holds all information dealing with graphics for the game
  
  Graphics::Graphics() {
      SDL_CreateWindowAndRenderer(640, 480, 0, &amp;this-&gt;_window, &amp;this-&gt;_renderer);
      SDL_SetWindowTitle(this-&gt;_window, "Cavestory");
  }
  
  Graphics::~Graphics() {
      SDL_DestroyWindow(this-&gt;_window);
  }
  </code></pre>
  
  <p><em>main.cpp under Source Files</em></p>
  
  <pre><code>//Main.cpp - Entry point of program
  
  #include "graphics.h"
  #undef main
  
  int main(int argc, const char* argv[]) { 
      Graphics graphics;
      while (true) {
      }
      return 0;
  }
  </code></pre>
  
  <p>Can someone please tell me what to play around with in settings/code? Thank you!</p>
  
  <p>PS: I've only been learning C++ for about a month now, so I'm pretty horrible for now.</p>