Definition
in
Programming Questions
•
5 months ago
Hi,
Im looking at this code
int a = 10;
int b = 20;
if (a = b){
a = a + 10;
}
else{
b = b + 10;
}
obviously the mistake in the code is that it canot convert from int to boolean, thats simple, i know how to fix this etc
What I want to ask though is how do you explain what is happening. Like, im struggling to define why it cant convert. I get it is a one bit value and therefore cannot represent integers but how do you properly define this in a sentance? any help?
1