C++ data types have OS- and hardware-specific internal representations...
...If we display a numeric value using formatted output, its value is properly converted to a corresponding sequence of characters.
...If we display a bool, we could convert its value to words "true" or "false".
Formatted Output handles value-to-text conversions for us:
For example,
#include <iomanip> #include <iostream> using std::cout; using std::boolalpha; int main( ) { int i = 789; double d = 0.5; bool b = true; cout << i; cout << ';'; cout << d; cout << ';'; cout << boolalpha << b; return 0; } /* Program output: 789;0.5;true */