How do I find the current directory?
Boost filesystem library provides a clean solution
current_path()
Since you added the visual-c++ tag I'm going to suggest the standard windows function to do it. GetCurrentDirectory
Usage:
TCHAR pwd[MAX_PATH];
GetCurrentDirectory(MAX_PATH,pwd);
MessageBox(NULL,pwd,pwd,0);
Use _getcwd
to get the current working directory.