Sign in to follow this  
NewbJ

Automatic file creation folder...?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this