C
Christopher Benson-Manica
I have compiled the following program with two different
implementations without any warnings at all. Why is a char *
converted to a bool (apparently) without a cast?
void foo( bool a ) {}
int main() {
foo( "123" );
const char *bar="123";
foo( bar );
return 0;
}
implementations without any warnings at all. Why is a char *
converted to a bool (apparently) without a cast?
void foo( bool a ) {}
int main() {
foo( "123" );
const char *bar="123";
foo( bar );
return 0;
}