In C++ I\'ve got a float/double variable.
When I print this with for example cout the resulting string is period-delimited.
cout << 3.1415 <
This is controlled by your program's locale.
How you set a program's default locale depends on the platform. On POSIX type platforms, it's with the LANG and LC_* environment variables, for instance.
You can force a particular locale -- different from the default -- within a C++ program by calling ios::imbue. Something like this might work:
#include
cout.imbue(std::locale("German_germany"));
The idea is to force a locale where comma is the decimal separator. You might need to adjust the "German_germany" string to get the behavior you want on your particular platform.