Simple Boolean function problem.

In the code below, when i put message(true); into the main function it outputs Hello,which i understand, but what i don't understand is why when i put in just message(false); it outputs goodbye, wouldn't that mean the message function would basically read
void message ( false)
{
if ( false)
cout << "Hello" << endl;
else
cout << "Goodbye" << endl;

which would output Hello? I'm sure this is a very easy problem but any help would be appreciated , thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
  #include <iostream>
using namespace std;
void message ( bool x )
{
if ( x )
cout << "Hello" << endl;
else
cout << "Goodbye" << endl;
}
main()
{
}
return 0;
Topic archived. No new replies allowed.