我想在我的数组中解析char
并在代码中使用它们。例如 char 数组是 a3。我收到警告:“指针和整数之间的比较。” 我怎样才能解决这个问题?int
char
bool isValid(char piece[1]){
if((piece[0] != "a") || (piece[0] != "b") || (piece[0] != "c") || (piece[0] != "d") || (piece[0] != "e") || (piece[0] != "f") || (piece[0] != "g") || (piece[1] <= 0) || (piece[1] > 7))
return false;
else
return true;