I would like to make a program that generates a random number between 1-10, gets the player to guess if the next number will be higher or lower.
I have decided to code this in c++, SDL SFML. I have this exception that crashes my game:

First-chance exception at 0x0FBD8B51 (msvcr120d.dll) in Higher Or Lower.exe: 0xC0000005: Access violation reading location 0x74742E6C.

The code that is causing it is:

if (!font.loadFromFile("arial.ttf"))
    cout << "Error: Can not load the font 'arial.ttf' from file!" << endl;

It runs in Release fine but in Debug it gets this runtime error

1

There are 1 best solutions below

0
On

I fixed it, It was a VS bug. I made a new project and it works!