Jump to content
  • Advertisement
Sign in to follow this  
MTclip

get working directory

This topic is 5026 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

2 questions all C / C++ 1.I am using FindFirstFile(), what I want to know is how to access a folder inside the directory i am working in..... lets say i want to access a folder named - Debug - so FindFirstFile("//Debug/.*") ---- i think this works... any ways 2. Is there a way to find the working directory?? ////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

Share this post


Link to post
Share on other sites
Advertisement
1. lookup msdn documentation for dirent

2. getcwd(), _getcwd()

EDIT:
1. dirent is the way to do it in unix - but MSDN Documentation has a porting guide ( chapter 10 "UNIX scandir example" here )
ps: working with file descriptors should also work ( at least on Unix it does ).
2. getcwd() is UNIX, _getcwd() is Win32. Again, see MSDN Unix->Win32 Migration Guide ( same link but more on the top )

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!