This question has already been answered:

Why stod("1.2") displays:

1.00000000000000

?

Reported as a duplicate by participants aleksandr barakin , Pavel Mayorov , αλεχολυτ , br3t , Darth July 7 '17 at 13:20 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • @Gambit, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

4 answers 4

It seems that the case with a comma is correctly defined.

    Russian localization.

    Add in the right place

     setlocale(LC_NUMERIC,"C"); 

    and the integer separator in the number will be a period ( . ), rather than a comma ( , ).

      hashcode.ru/questions/211103/

        atof() tried?

        • one
          where do you get that damn s? - etki