title: My class doesn't work propery
body: <p>I'm getting an error in my code I don't get at all.</p>
  
  <p>Here is my code:</p>
  
  <p><strong>MyClass.h</strong></p>
  
  <pre><code>#include "MyClass.h"
  
  int i = 1;
  
  MyClass::MyClass()
  {
  
  }
  
  MyClass:~MyClass()
  {
  
  }
  </code></pre>
  
  <p><strong>MyClass.cpp</strong>
      #pragma once</p>
  
  <pre><code>class MyClass
  {
      public:
          MyClass();
          virtual ~MyClass();
  
          int i;
      protected:
      private:
  };
  </code></pre>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include&lt;iostream&gt;
  #include "MyClass.h"
  
  using namespace std;
  
  int main()
  {
      MyClass myObject = *new MyClass();
  
      cout &lt;&lt; myObject.i &lt;&lt; endl;
      cin.get();
  }
  </code></pre>
  
  <p>I just get some random number. Any help here?</p>