Javatpoint Logo
Javatpoint Logo

C++ Manipulator noshowpoint

C++ manipulator noshowpoint function is used to clear the showpoint format flag for the str stream.

When we not set showpoint format flag, the decimal point is only written when necessary for floating point values inserted into the stream; when their decimal point is not zero.

Syntax

Parameter

str: stream object whose format flag is affected.

Return value

It returns argument str.

Data Races

Data races may occur when modified str concurrent accesses to the same stream object.

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 noshowpoint:

Output:

1.0 with showpoint: 1.00000
1.0 with noshowpoint: 1

Example 2

Let's see another simple example:

Output:

30.000	10000.	3.1416
30	10000	3.1416

Example 3

Let's see another simple example:

Output:

Enter your percent : 79.8
Percent with showpoint: 79.8000
Percent with noshowpoint: 79.8
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