• Advertisement
Sign in to follow this  

Automatic file creation folder...?

This topic is 4981 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 seem to remember coming across this problem before a long time ago, but I can't remember the fix, and I can't find it on google and the likes, so... While using fstream to create a file (using the Dev-C++ compiler), the file is created in C:\Dev-C++, rather than the folder where my project is. Does anyone know the fix for this? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
The reason for this is because you are running your application inside the Dev-C++ debugger. When the debugger is active, the current directory(Or "Working Directory") is set to "C:\Dev-C++".

If you click your EXE file, instead of running it in the debugger, and the working path is set the the path where your exe is in.

Toolmaker

Share this post


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

  • Advertisement