std::showpo...:noshowpoint(3)
okay bestie, this is the std::showpo...:noshowpoint(3) page from the C++ Standard Libary manual π
β¨ β and yes, we're talking about the twin manipulators for decimal points.
NAME π
std::showpoint,std::noshowpoint - std::showpoint,std::noshowpoint
Synopsis β¨
Defined in header <ios>:
std::ios_base& showpoint( std::ios_base& str ); (1)
std::ios_base& noshowpoint( std::ios_base& str ); (2)
So basically these two enable or disable the unconditional inclusion of the decimal point character in floating-point output. Has no effect on input, periodt.
(1)Enables theshowpointflag in the streamstras if by callingstr.setf(std::ios_base::showpoint). Slay.(2)Disables theshowpointflag in the streamstras if by callingstr.unsetf(std::ios_base::showpoint). Iconic.
This is an I/O manipulator, so it may be called with an expression such as out << std::showpoint for any out of type std::basic_ostream, or with an expression such as in >> std::showpoint for any in of type std::basic_istream. Iykyk π¦.
The character to use as decimal point character is determined by the numpunct facet of the locale imbued in the stream at the time of output, as described in std::num_put::put. Lowkey important πΈ.
Parameters π
strβ reference to I/O stream
Return value π«Ά
str (reference to the stream after manipulation).
Example π¦
// Run this code
#include <iostream>
int main()
{
std::cout << "1.0 with showpoint: " << std::showpoint << 1.0 << '\n'
<< "1.0 with noshowpoint: " << std::noshowpoint << 1.0 << '\n';
}
Output π
1.0 with showpoint: 1.00000
1.0 with noshowpoint: 1
See also π
resetiosflagsβ clears the specifiedios_baseflags (function)setiosflagsβ sets the specifiedios_baseflags (function)
mwah π β source http://cppreference.com, version/date 2024.06.10, page std::showpo...:noshowpoint(3) π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms