I'm using the ASCII code 219 to print out "█" in a character array. however I would like to check the value of that cell later on in the program using a if statment.
this is what i currently have to try to check the value: if(gameboard[playery][playerx] == 219){}. however is vs code it will give a message stating that the comparison is allways faulse due to range limitations for the data type.
is there a diffrent way of doing this?
i've tried single and double quotes aswell as using the box as plan text in the program but none of that works. i also tried using the octal value from this suggestion in a diffrent post however the message still appered.
I'm not sure about whether the char is signed or not, but I think that @teapost418 is correct that you just have to type cast 219 as a char:
I think that otherwise 219 would be interpreted as an int.