小编Pra*_*hat的帖子

IntelliSense:类型为“ const char *”的参数与类型为“ LPCWSTR”的参数不兼容

我收到以下错误:

argument of type "const char *" is incompatible with parameter of type "LPCWSTR"

这是我的代码:

static char *getFmuPath(const char *fileName) {
    char pathName[MAX_PATH];
    int n = GetFullPathName(fileName, MAX_PATH, pathName, NULL);
    return n ? strdup(pathName) : NULL;
}
Run Code Online (Sandbox Code Playgroud)

我已经声明了,MAX_PATH但是路径名仍然显示错误

#define MAX_PATH 4096
Run Code Online (Sandbox Code Playgroud)

问题是什么 ?

c c++ intellisense visual-studio

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

c ×1

c++ ×1

intellisense ×1

visual-studio ×1