SFML community forums

Help => Graphics => Topic started by: nicedude80 on October 31, 2013, 11:53:22 pm

Title: Paths [Solved]
Post by: nicedude80 on October 31, 2013, 11:53:22 pm
I was wondering how to write paths?

Like to load a font I have a folder that has my exe in it, then i have a folder (fonts) inside that, and in the fonts folder I have a file called arial.ttf.

How do I use the path (fonts\arial.ttf) in the if(!font.loadFromFile(insert path here)) statement? I dont know the proper format for paths.

Thanks!

I solved it. All I had to do was use // instead of \ or \\ like if(!font.loadFromFile(fonts//arial.ttf))
Title: Re: Paths [Solved]
Post by: Stauricus on November 01, 2013, 11:40:24 am
what? i don't understand why that worked, but you need to put quotes around the path name:
 if(!font.loadFromFile("fonts/arial.ttf"))