Say you let:
int x = 4;
char y = 4;
why does
cout << (x == y);
print 1 when:
cout << x << " " << y;
prints out 4 and some weird ascii symbol
yet if you change y to '4' you get 0 for the equality test and they both print out as 4 when printed out individually.
int x = 4;
char y = 4;
why does
cout << (x == y);
print 1 when:
cout << x << " " << y;
prints out 4 and some weird ascii symbol
yet if you change y to '4' you get 0 for the equality test and they both print out as 4 when printed out individually.