In addition to this post:
https://cboard.cprogramming.com/cplusplus-programming/182326-my-game-crashes.html