title: Unhandled exception at (msvcr120d.dll)
body: <p>Have written some code for university coursework. 
  This code compiles and runs well on the machines at university - but does not run on my personal laptop. I'm using Visual Studio 2013 (same as at Uni), running windows 10 via bootcamp on a 2015 Macbook. </p>
  
  <p>Code compiles fine - prints the first few lines in console - then crashes, with the following error. </p>
  
  <p>"Unhandled exception at 0x56BEA9E8 (msvcr120d.dll) in ConsoleApplication3.exe: 0xC0000005: Access violation reading location 0xCCCCCCC0."</p>
  
  <pre><code>int main()
  {
      string wheel1[3], wheel2[3], wheel3[3];
  
      for (int counter = 0; counter &lt; 4; counter++) { wheel1[counter] = getSuit(); }
      for (int counter = 0; counter &lt; 4; counter++) { wheel2[counter] = getSuit(); }
      for (int counter = 0; counter &lt; 4; counter++) { wheel3[counter] = getSuit(); }
  
      return 0;
  }
  </code></pre>
  
  <p>Have tried searching for solutions - but these generally seem to point towards some bad coding. </p>
  
  <p>Have looked through for anything similar to the other errors I found, but nothing's jumping out at me. </p>
  
  <p>Also unsure as to why this code would work flawlessly on one machine, and not on another...</p>
  
  <p>All help much appreciated..!</p>
  
  <ul>
  <li><p>@Ian, Seems to be  <code>_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead-&gt;nBlockUse));</code>in dbgdel.cpp, as called by <code>for (int counter = 0; counter &lt; 4; counter++) { wheel1[counter] = getSuit(); }</code></p>
  
  <ul>
  <li>Edit: Have removed all code irrelevant to error.</li>
  </ul></li>
  </ul>