, , ( ), , .
Visual Studio ( "CWD" ).
Visual ++ Solution/Project :
Solution <- the location of your solution file
Debug <- where the Debug executables end up
Release <- where the Release executables end up
Project <- the location of your project file
Debug <- where Debug intermediate files end up
Release <- where Release intermediate files end up
Studio, " ", " ", CWD , Solution\Project.
However, when you perform an appearance by simply double-clicking the application, CWD is the application directory ( Solution\Debugfor example).
If you try to open a file from the current directory (what happens when you do std::ifstream ifstr("myfile.txt")), whether it will be successful depends on where you were when you started the application.
source
share