std::string _text = asLowerCaseString(text);
for(uint8_t i = 0; i < _text.length(); i++)
{
char t = _text;
if(t != '-' && t != '.' && !(t >= 'a' && t <= 'z'))
{
_text.erase(i, 1);
i--;
}
}
std::string words []= {".net","no-ip", ".net", ".com", ".com.br", ".org", ".pl", ".net"};
int ii, length;
length = sizeof(words)/sizeof(words[0]);
for(ii=0; ii < int(length); ii++)
{
if (int(_text.find(words[ii])) > 0 || _text == words[ii])
{
return false;
break;
}
}
行錯誤
char t = _text;
錯誤
我使用MSVC 2012There is no conversion function "std :: string" a "char" suitable
,此代碼linux下的編譯器,但沒有窗戶的罰款。
更換無無無無無。不要這樣寫代碼。 :( – erip
錯誤發生在哪一行?我們不介意讀者,你知道! –
這行 - > char t = _text; – dohdle