i have this game of domino i created using CPP. While playing i'm getting this error:
Unhandled exception at 0x76FF5934 (ntdll.dll) in Domino.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77011378).
Same error but the timing and the place in code it breaks is different, but the code it breaks on is always the same:
Stone* P = new Stone[numP];
This code is found in all sort of places, Stone is a class i created to represent a domino stone.
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.