Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
std::setbase is a stream manipulator to change the
output of numbers to the octal, decimal or hexadecimal number system.
Screen output:
0(dec) 0(oct) 0(hex)
1(dec) 1(oct) 1(hex)
2(dec) 2(oct) 2(hex)
3(dec) 3(oct) 3(hex)
4(dec) 4(oct) 4(hex)
5(dec) 5(oct) 5(hex)
6(dec) 6(oct) 6(hex)
7(dec) 7(oct) 7(hex)
8(dec) 10(oct) 8(hex)
9(dec) 11(oct) 9(hex)
10(dec) 12(oct) a(hex)
11(dec) 13(oct) b(hex)
12(dec) 14(oct) c(hex)
13(dec) 15(oct) d(hex)
14(dec) 16(oct) e(hex)
15(dec) 17(oct) f(hex)
16(dec) 20(oct) 10(hex)
17(dec) 21(oct) 11(hex)
18(dec) 22(oct) 12(hex)
19(dec) 23(oct) 13(hex)
|
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
