InterviewSolution
Saved Bookmarks
| 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 { 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; } |
|