Jump to content
  • Advertisement
Sign in to follow this  
chad_420

get directory my game is in?

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I cant figure it out, I just need to know what directory the executable is Im using devcpp/mingw under windows.

Share this post


Link to post
Share on other sites
Advertisement
GetCurrentDirectory() also works. It'll return the absolute path to your exe.

Share this post


Link to post
Share on other sites
Quote:
Original post by JD
GetCurrentDirectory() also works. It'll return the absolute path to your exe.
not if your current working path changes subsequent to Win32 API usage
such as common file open/save dialogs.

Share this post


Link to post
Share on other sites
Quote:
Original post by silvermace
not if your current working path changes subsequent to Win32 API usage
such as common file open/save dialogs.


Or if you have a shortcut to the exe file that has the "start in" entry set to another directory than the exe is in.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!