title: Calling member function on non existing object works correctly, c++
body: <p>Consider the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class someClass
  {
  public:
      someClass(){ cout&lt;&lt;"someClass"&lt;&lt;endl; }
      void g() const { cout&lt;&lt;"g()"&lt;&lt;endl;}
  };
  
  int main()
  {
      void* memory = new void*[5*(sizeof(someClass)/sizeof(char))];
      someClass *someClassArray = reinterpret_cast&lt;someClass*&gt;(memory);
  
      for(int i=0;i&lt;5;i++)
      {
          someClassArray[i].g();
      }       
  }
  </code></pre>
  
  <p>The output for this code is:</p>
  
  <pre><code>g()
  g()
  g()
  g()
  g()
  </code></pre>
  
  <p>Which means that no constructor was called. But in array someClassArray are onjects of someClass type and I am allowed to call a g() function and get a proper output.</p>
  
  <p>Why this program is executet correctly, while no object of type someClass is consructed?</p>