(about)

Solutions Log

October 15th 2009

Print a Boolean

C Approach

bool myBoolean = true;
printf("The value is %s", (myBoolean) ? "true" : "false");
// The value is true

C++ Approach

boolean myBoolean = true;
std::cout << "The value is " << myBoolean << std::endl;
// The value is 1