C++ examples for File Stream:cout
Print the decimal value 100 in hexidecimal form preceded by 0x
#include <iomanip> #include <iostream> #include <limits> int main(int argc, const char *argv[]) { std::cout << "0x" << std::hex << 100 << std::endl; return 0;// w ww. ja v a2 s . c o m }