C++ Manipulator resetiosflagsC++ manipulator resetiosflags is used to unset the format flag specified by parameter mask. When resetiosflags is used in an expression out<<resetiosflags(mask) or in>>resetiosflags(mask), clears all format flags of the stream out or in as specified by the mask. SyntaxParametermask: mask representing the flags to be set. Return valueThis function returns an object of unspecified type. The resetiosflags function should be used only as a stream manipulator. Data RacesThe stream object on which it is inserted or extracted is modified and concurrent access to the same stream object may introduce data races. ExceptionsObject is in a valid state, if any exception is thrown. Example 1Let's see the simple example to demonstrate the use of resetiosflags manipulator: Output: 0x64 64 Example 2Let's see another simple example: Output: Parsing "10 010" with std::oct gives: 8 8 Parsing "10 010" with std::dec gives: 10 10 Parsing "10 010" with autodetect gives: 10 8 Example 3Let's see another simple example: Output: 0X2A
Next TopicC++ Manipulator
|