Javatpoint Logo
Javatpoint Logo

C++ Manipulator noshowpos

C++ manipulator noshowpos function is used to clear the showpos format flag for the str stream.

When we set noshowpos format flag, then it disables the display of the '+' sign in non-negative integer (including zero) output.

Syntax

Parameter

str: stream object whose format flag is affected.

Return value

It returns argument str.

Data Races

Data races may cause when modifies str concurrent access to the same stream object.

no

Exceptions

str is in a valid state, if an exception is thrown.

Example 1

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

Output:

+1	+0	-1
 1	 0	-1

Example 2

Let's see another simple example:

Output:

+75
75

Example 3

Let's see another simple example:

Output:

Enter Number: 24
+24
24
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