error C2664: “int _access(const char *,int)”: 无法将参数 1 从“CString”转换为“const char *”1> 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符。
VS2013运行如下代码时报 error C2664错误,
if (_access(strExePath, 0))
CreateDirectory(strExePath, NULL);
修改方式:
- 将编码方式更改为ANSI;
- 将_access修改为_waccess;