How to change working directory in Visual Studio

Updated post here: https://codeyarns.github.io/tech/2013-12-30-how-to-change-working-directory-in-visual-studio.html

How to change working directory in Eclipse CDT

Eclipse CDT is a C/C++ development environment for Eclipse. When you compile a binary in a CDT project and run it, it runs with the root directory of the project as its working directory. This is the directory where the program would read or write files if you provide no path or directories to it.

If you wish that the program run with a different directory as its working directory, here is how:

  1. Right-click on the project name in Project Explorer, choose Properties > Run/Debug Settings > Choose the launch configuration > Edit > Arguments > Working directory

  2. Uncheck the Use default option. For a project named foobar, the default entry here is ${workspace_loc:foobar}

  3. If the working directory you want is a subdirectory of the project directory, then append it. For example: ${workspace_loc:foobar}/bin. Else type in an absolute path as working directory.

Tried with: Eclipse 3.7.2, Eclipse CDT 8.0.2 and Ubuntu 12.04 LTS