- Online Community Forums » Programming Questions » al_fopen XCode

This thread is locked; no one can reply to it. rss feed Print
al_fopen XCode
Member #15,888
February 2015


somehow my application isn't able to find a txt file. I'm getting "Thread 6: EXC_BAD_ACCESS (code=1, address=0x554485244)"
The file is in a folder within the Supporting Files path and it's a cocoa project in Xcode.

ALLEGRO_FILE *file = al_fopen("rooms/raum0.txt", "r");

Chris Katko
Member #1,881
January 2002

Did you try:

ALLEGRO_FILE *file = al_fopen("./rooms/raum0.txt", "r"); //note ./

“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

Go to: