Your program is configured to compile as unicode. This is why GetCurrentDirectory is the GetCurrentDirectoryW that expects LPWSTR( wchar_t*).
GetCurrentDirectoryW expects wchar_tinstead of an array char. You can do this using TCHAR, which, like GetCurrentDirectory, depends on the unicode parameter and always represents the corresponding character type.
Remember to add '\0'to Lto make literal unicode char too!
source
share