Name

noshowpos function — Manipulator to suppress plus sign in nonnegative output

Synopsis

ios_base& noshowpos(ios_base& stream)

The noshowpos function is a manipulator that clears the showpos flag, which causes an output stream to always write a plus sign (+) in front of a number even if the sign is unnecessary (the value is 0 or positive). Specifically, the function calls stream.unsetf(ios_base::showpos) and returns stream.

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.