I've been trying to load a font into one of my projects but I keep getting an unhandled exception. Im using visual studio 2013.
error message:
Unhandled exception at 0x639FF20C (msvcr120.dll) in Project1.exe: 0xC0000005: Access violation reading location 0x00924000.
#include <SFML\Graphics.hpp>
using namespace sf;
int main()
{
RenderWindow window(sf::VideoMode(800, 600), "test");
Font myFont;
myFont.loadFromFile("arial.ttf");
Text myText;
myText.setFont(myFont);
myText.setString("Test");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed) window.close();
}
}
}