std::numpunct<CharT>::decimal_point,do_decimal_point (3) - Linux Manuals
std::numpunct<CharT>::decimal_point,do_decimal_point: std::numpunct<CharT>::decimal_point,do_decimal_point
Command to display std::numpunct<CharT>::decimal_point,do_decimal_point
manual in Linux: $ man 3 std::numpunct<CharT>::decimal_point,do_decimal_point
NAME
std::numpunct<CharT>::decimal_point,do_decimal_point - std::numpunct<CharT>::decimal_point,do_decimal_point
Synopsis
Defined in header <locale>
public: (1)
char_type decimal_point() const;
protected: (2)
virtual char_type do_decimal_point() const;
1) Public member function, calls the member function do_decimal_point of the most derived class.
2) Returns the character to be used as the decimal separator between integer and fractional parts.
Return value
The value of type char_type to use as the decimal separator. The standard specializations of std::numpunct return '.' and L'.'.
Example
// Run this code
#include <iostream>
#include <locale>
struct slash : std::numpunct<char> {
char do_decimal_point() const { return '/'; } // separate with slash
};
int main()
{
std::cout.precision(10);
std::cout << "default locale: " << 1234.5678 << '\n';
std::cout.imbue(std::locale(std::cout.getloc(), new slash));
std::cout << "locale with modified numpunct: " << 1234.5678 << '\n';
}
Output:
default locale: 1234.5678
locale with modified numpunct: 1234/5678
Pages related to std::numpunct<CharT>::decimal_point,do_decimal_point
- std::numpunct<CharT>::grouping,std::numpunct<CharT>::do_grouping (3) - std::numpunct<CharT>::grouping,std::numpunct<CharT>::do_grouping
- std::numpunct<CharT>::numpunct (3) - std::numpunct<CharT>::numpunct
- std::numpunct<CharT>::thousands_sep,do_thousands_sep (3) - std::numpunct<CharT>::thousands_sep,do_thousands_sep
- std::numpunct<CharT>::truename,do_truename,falsename,do_falsename (3) - std::numpunct<CharT>::truename,do_truename,falsename,do_falsename
- std::numpunct<CharT>::~numpunct (3) - std::numpunct<CharT>::~numpunct
- std::numpunct (3) - std::numpunct
- std::numpunct_byname (3) - std::numpunct_byname
- std::num_get (3) - std::num_get
- std::num_get<CharT,InputIt>::get,std::num_get<CharT,InputIt>::do_get (3) - std::num_get<CharT,InputIt>::get,std::num_get<CharT,InputIt>::do_get
- std::num_get<CharT,InputIt>::num_get (3) - std::num_get<CharT,InputIt>::num_get
- std::num_get<CharT,InputIt>::~num_get (3) - std::num_get<CharT,InputIt>::~num_get
- std::num_put (3) - std::num_put