title: A heap has been corrupted in various places through the code
body: <p>i have this game of domino i created using CPP.
  While playing i'm getting this error:</p>
  
  <blockquote>
    <p>Unhandled exception at 0x76FF5934 (ntdll.dll) in Domino.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77011378).</p>
  </blockquote>
  
  <p>Same error but the timing and the place in code it breaks is different,
  but the code it breaks on is always the same:</p>
  
  <pre><code>Stone* P = new Stone[numP];
  </code></pre>
  
  <p>This code is found in all sort of places, Stone is a class i created to represent a domino stone.</p>
  
  <p>I have no idea what's wrong, i'm pretty sure it has something to do with memory but i have no idea why this line is causing problems, i'm not expecting you to tell me why it's happening since you can't see the full code but i hope you could try and help me with places to search for.</p>