C++ Manipulator noshowbaseC++ manipulator noshowbase function is used to clear the showbase format flag for the str stream.
SyntaxParameterstr: stream object whose format flag is affected. Return valueIt returns argument str. Data RacesData races may be occurred when modified str concurrent accesses 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 noshowbase: Output: 0x14 14 Example 2Let's see another simple example to demonstrate the use of stream manipulator showbase to force an integer to print in decimal, octal and hexadecimal formats and noshowbase to reset the showbase: Output: Printing integers preceded by their base: 100 0144 0x64 Example 3Let's see another simple example: Output: showbase: 0x2a noshowbase: 2a With showbase, parsing 3.14 as money gives 0 Without showbase, parsing 3.14 as money gives 0
Next TopicC++ Manipulator
|