所以我創造了這個dll的今天,它的崩潰沒有理由崩潰行爲......C++不理解
這工作:
testa++;
testb++;
const char *t = "test";
if (t == "adoinfosidnoxucnviune")
{
}
這崩潰的TESTB ++:
testa++;
const char *t = "test";
if (t == "adoinfosidnoxucnviune")
{
testb++;
}
其中testa和testb是整數.. t不是連字符串它與我相比,我不明白
你不能比較那樣的C字符串。 – chris
與strcmp(t,「whatever」)完全相同的事情== 0 – user2361925
請填寫完整的示例。是否初始化了'testb'? –