Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

uppercase

Specifies that hexadecimal digits and the exponent in scientific notation appear in uppercase.

ios_base& uppercase( 
   ios_base& _Str 
);

_Str

A reference to an object of type ios_base, or to a type that inherits from ios_base.

A reference to the object from which _Str is derived.

By default, nouppercase is in effect.

The manipulator effectively calls _Str.setf(ios_base::uppercase), and then returns _Str.

// ios_uppercase.cpp
// compile with: /EHsc
#include <iostream>

int main( void ) 
{
   using namespace std;
   
   double i = 1.23e100;
   cout << i << endl;
   cout << uppercase << i << endl;

   int j = 10;
   cout << hex << nouppercase << j << endl;
   cout << hex << uppercase << j << endl;
}
1.23e+100
1.23E+100
a
A

Header: <ios>

Namespace: std

Show:
© 2015 Microsoft