File directories

How can I make my c++ app to look for resources, files etc. in it's own directory? Whenever I run apps that I've made, I have to specify exactly where the files to found are, even if they are in the same dir as the app itself.
If you don't specify any directory, your program will get the files from its working directory ( which usually is the directory on which the executable is located )
That's exactly the problem, my programs don't look in their own directory. They seem to be looking in /Users/myaccount by default.
GetModuleFilename()
http://www.google.com/search?btnI=1&q=msdn+GetModuleFilename

Pass NULL as the first argument and make sure the target path has at least MAX_PATH characters.
Remember, only read stuff from the application directory, never write. (Else your users will hate you.)

Hope this helps.
Topic archived. No new replies allowed.