(C++) std::uppercase
February 24, 2017 · View on GitHub
(C++) std::uppercase
std::uppercase is a stream manipulator: when a number's base and/or non-decimal digits are show, std::uppercase displays these in uppercase.
#include <iostream> int main() { const int x = 255; //0xFF std::cout << std::showbase << std::hex << std::uppercase << x << '\n' << std::nouppercase << x << '\n'; }
Screen output:
0XFF 0xff