This error message is a bit misleading. But it makes perfect sense. Here's what happens:
[0] fetches a specific element of the string, a character, which is of type char. The char is promoted to an integer before being compared.
"0" is a C-style string, an array of two chars, which decays to a pointer const char*.
So in the end, you try to compare an int with a const char* and that is why the compiler complains the way it does.