How do I find the current directory?

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

Leave a Comment