(unspecified) setbase(int iBase);
#include <iomanip>
#include <iostream> #include <iomanip> int main() { using namespace std; int iInt = 1234; // Output the value with the default decimal setting cout << "Default: " << iInt << endl; // Output the value in hexadecimal cout << setbase(16); cout << "Hexadecimal: " << iInt << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.