I want to parse char
and int
in my char
array and use them in the code. For example the char array is a3. I am getting a warning: "comparison between pointer and integer."
How can I fix this?
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;