#include <iostream>
#include <sstream>
#include <locale>
#include <clocale>
#include <stdlib.h>

template <class charT, charT sep>
class punct_facet: public std::numpunct<charT> {
protected:
    charT do_decimal_point() const { return sep; }
};

int main() {
    auto lc = std::locale(std::locale("C"), new punct_facet<char, ','>);
    std::locale::global(lc);
    std::cout.imbue(lc);

    std::stringstream str("2,134 43,54 22,334");
    double d;
    while (str >> d)
    {
        std::cout << d << '\n';
    }
    return 0;
}
