1.

How Can I Output Hex Values In Upper Case Using The Iostream Libraries?

Answer»

You need to set the state of the STREAM using setf(). For EXAMPLE

#include 

INT MAIN(void) 

cout << hex; 

cout << "nNot upper-case : " << 255; 

cout.setf(ios::upper-case); 

cout << "nUppercase : " << 255; 

return 0; 

}

You need to set the state of the stream using setf(). For example, 

#include 

int main(void) 

cout << hex; 

cout << "nNot upper-case : " << 255; 

cout.setf(ios::upper-case); 

cout << "nUppercase : " << 255; 

return 0; 

}



Discussion

No Comment Found