这种是什么原因?
错误问题应该在这边,但我不知道是什么原因
#include <string>
#include <iostream>
#define NEW_APP_PATH "%APPPATH%"
#define VAL_OPEN std::string(NEW_APP_PATH).substr(0,std::string(NEW_APP_PATH).find_last_of('\\'))
这种是什么原因?
错误问题应该在这边,但我不知道是什么原因
#include <string>
#include <iostream>
#define NEW_APP_PATH "%APPPATH%"
#define VAL_OPEN std::string(NEW_APP_PATH).substr(0,std::string(NEW_APP_PATH).find_last_of('\\'))
3 回答1.4k 阅读✓ 已解决
1 回答1.2k 阅读✓ 已解决
4 回答931 阅读
1 回答999 阅读
1 回答1k 阅读
1 回答788 阅读
1 回答889 阅读
看起来像是你的代码里有类似这样的一句:
其中someFunction接受一个
const char *
。但是由于VAL_OPEN的类型是std::string
,所以这里就报错了。解决方法是改成即可。