vtdata library
|
Public Member Functions | |
ScopedLocale (int category, const char *locale_string) | |
See the C function setlocale() for an explanation of the arguments. | |
Protected Attributes | |
std::string | m_old_locale |
The locale might be set to something strange, ala European. that interprets '.' as ',' and vice versa. That terribly breaks VTP's usage of printf/sscanf/atof to encode and parse numbers.
This handy class encapsulates overriding the locale. Use it like this for 'standard' numbers: