jjzjj

checkForRoll

全部标签

c++ - 为什么我的 "intellect"变量不会加 5?

if(checkForRoll=="intellect"&&checkForRoll=="Intellect"){//checksforintellectintellect=intellect+5;}elseif(checkForRoll=="strength"&&checkForRoll=="Strength"){strength=strength+5;}cout当我执行此命令时,intellectint不会加5。为什么? 最佳答案 您要求您的字符串同时等于intellect和Intellect,这是不可能的。将“和”(&&)更改