I've been trying to figure out how to set the working directory to the same directory as my program. As I am unfamiliar with Objective-C and Cocoa, I wrote this as a basic command line application, meaning standard in/out. For some reason, the working directory is set to the $HOME directory as opposed to the same directory as the file itself. I know using
system("PWD");
would echo the path, but in an unusable (at least to me) format.
Edit: Just for a little clarification, I need to be able to use relative file paths for file streams on more than just my machine/user.