c++ - IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" -


i following error :

argument of type "const char *" incompatible parameter of type "lpcwstr"

here code :

static char* getfmupath(const char* filename){ char pathname[max_path]; int n = getfullpathname(filename, max_path, pathname, null); return n ? strdup(pathname) : null; } 

i have declared max_path still shows error in pathname

#define max_path 4096 

what problem ?

getfullpathname doesn't take char *. @ docs, takes lptstr , lpctstr.

depending on build settings, lptstr , related types become either char* (ansi builds) or wchar_t* (unicode builds). building unicode.

also, don't know why defining max_path. windows constant should not re-define it.


Comments