我有这个变量 dirpath2 我存储路径的最深目录名称:
typedef std::basic_string<TCHAR> tstring;
tstring dirPath = destPath;
tstring dirpath2 = dirPath.substr(destPathLenght - 7,destPathLenght - 1);
我希望能够将它与另一个字符串进行比较,例如:
if ( _tcscmp(dirpath2,failed) == 0 )
{
...
}
我已经尝试了很多东西,但似乎没有任何效果。谁能告诉我该怎么做或我做错了什么?
请记住,我对 C++ 几乎一无所知,这整件事让我发疯。
提前谢谢