Javatpoint Logo
Javatpoint Logo

C++ Manipulator resetiosflags

C++ 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.

Syntax

Parameter

mask: mask representing the flags to be set.

Return value

This function returns an object of unspecified type. The resetiosflags function should be used only as a stream manipulator.

Data Races

The stream object on which it is inserted or extracted is modified and concurrent access to the same stream object may introduce data races.

Exceptions

Object is in a valid state, if any exception is thrown.

Example 1

Let's see the simple example to demonstrate the use of resetiosflags manipulator:

Output:

0x64
64

Example 2

Let'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 3

Let's see another simple example:

Output:

0X2A
Next TopicC++ Manipulator





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA