get the current working directory
-
how to get the current working directory in MFC app Wizard (vc++), i have the code but it is working in Winconsole (vc++),but the same code is not working in MFC app Wizard, is there there any alternative code in MFC app wizard.. // #include #include #include void GetCurrentPath(char* buffer) { getcwd(buffer, _MAX_PATH); } void main() { char CurrentPath[_MAX_PATH]; GetCurrentPath(CurrentPath); printf("%s" , CurrentPath) ;//using messagebox instead of printf in mfc it is not working }
-
how to get the current working directory in MFC app Wizard (vc++), i have the code but it is working in Winconsole (vc++),but the same code is not working in MFC app Wizard, is there there any alternative code in MFC app wizard.. // #include #include #include void GetCurrentPath(char* buffer) { getcwd(buffer, _MAX_PATH); } void main() { char CurrentPath[_MAX_PATH]; GetCurrentPath(CurrentPath); printf("%s" , CurrentPath) ;//using messagebox instead of printf in mfc it is not working }
Use GetCurrentDirectory WIN32 API.