Forum

Post 18.06.2018   # 1
Subject Comma and Point in floating-point numbers

Hello,

When I use my program, which is written in C++ using wxWidgets, I have big problems with float numbers. Because I use it also on PCs with the German language profile and there float numbers have a comma instead of a point. My program should read numbers out of files, but there they are with points. wxWidgets adapts automatic to the language profile on the system and so functions like scanf or wxAtof don't work with floats with points. Is there any possibility to tell wxWidgets, that is should use English floating-point numbers? I tried already wxLocale::Init, but this causes some errors on my ubuntu linux, so it doesn't work. 

Any help will be apprecited.

I didn't find the right solution from the Internet.

References:

https://forums.wxwidgets.org/viewtopic.php?t=10691

Infographic Video Agency

Thank you.

MichaelSmith is offline Reply

Please login to post reply.