localeconv() - I/O Function
How is "localeconv()" used in C++?
is an I/O function that returns a pointer to the structure of type "lconv
", that contains geopolitical environmental information for formatting numbers.
struct lconv *localeconv(void);
int main ()
struct lconv * st;
printf ("US Currency is: %s\n",st->currency_symbol);
printf ("US Currency name is: %s\n", st->int_curr_symbol);
US Currency is: $
US Currency name is: USD
In the above example localeconv() is used with the localization category "LC_MONETARY"
to display the US currency symbol, currency name.