C++ Manipulator uppercaseC++ manipulator uppercase function is used to set the uppercase format flag for the str stream. When we set uppercase format flag, then it enables capital (uppercase) letters to use instead of lowercase for representations on output operations involving stream generated letters, like floating point, hexadecimal integer output and numerical base prefixes. It has no effect on input. SyntaxParameterstr: stream object whose format flag is affected. Return valueIt returns argument str. Data RacesData races may cause when modifies str concurrent access to the same stream object. Exceptionsstr is in a valid state, if an exception is thrown. Example 1Let's see the simple example to demonstrate the use of uppercase: Output: 0X4D 0x4d Example 2Let's see another simple example: Output: 0x2a with uppercase: 0X2A 0x2a with nouppercase: 0x2a 1e-10 with uppercase: 1E-10 1e-10 with nouppercase: 1e-10 Example 3Let's see another simple example: Output: 4.345E+10 0X75BCD15
Next TopicC++ Manipulator
|