I Have got an issue concerning Qt Locale environment when I execute the following code
QApplication(argc,argv) ;
float f = 42.5f
std::cout << std::to_string(f) ; // prints 42,5
Even if my computer got its locale to french I'd like my program to be compiled with us standard printing format (i.e. 42.5
). Is there a way to do that with a compiler option ?
This works fine for me:
main.cpp
main.pro
Build and Run
Output
This may be interesting for you: