Timeline for Function that adds commas between groups of 3 digits in a string
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 10, 2020 at 13:24 | history | edited | CommunityBot |
Commonmark migration
|
|
Oct 16, 2019 at 8:49 | history | edited | Toby Speight | CC BY-SA 4.0 |
Spelling fixes
|
Dec 7, 2018 at 18:01 | comment | added | Loki Astari |
Does MinGW have a command line? Is it bash ? export LC_ALL="en_US"<enter>./MyProgram<enter>
|
|
Dec 7, 2018 at 17:50 | comment | added | Loki Astari | @northerner That would be a good question for superuser.com Basically you want to set the local of your computer. So that applications can correctly pick up the local from the OS. | |
Dec 7, 2018 at 10:31 | comment | added | northerner | Where would I put these commands in? I'm running Windows with MinGW. | |
Dec 6, 2018 at 16:57 | comment | added | Loki Astari | There is nothing special you need to do. The locale code will ask the OS what the current locale is. So if the OS does not know then you will not get any change. But usually most machines are configured with a current locale (or at least a location and default language setting). | |
Dec 6, 2018 at 16:52 | comment | added | Loki Astari |
@northerner: This means your machine has no current local (or your machines locale is "C"). You should probably look at the machine configuration and make sure it is correctly configured. But You can force a locale by setting the environment variable LC_ALL. Example: > LC_ALL=en_US ./myProgram
|
|
Dec 6, 2018 at 9:07 | comment | added | northerner | Are there any special options needed for compiling with this? | |
Dec 6, 2018 at 9:07 | comment | added | northerner |
It would appear imbue(std::locale("")) does not work on my machine. I copy and pasted your example and it had printed 123456789 . I also copied the example here and still have no commas. I assume it wasn't working with the string returned from the mpz_class but it seems like something more fundamental is wrong.
|
|
Dec 5, 2018 at 23:32 | history | answered | Loki Astari | CC BY-SA 4.0 |