// implicit-cast.cc #include using namespace std; // let the compiler cast it for us automatically int main() { int i; bool b_t = true, b_f = false; i = b_t; cout << "true casts to int as " << i << endl; i = b_f; cout << "false casts to int as " << i << endl; }