I've been developing a small program for the University where I live.
I need to print a lot of floating-point values to a text file. Naturally, I want to use C++ streams.

In Sweden we don't use .(dot) as the decimal separator, we use ,(comma) instead. This has caused some trouble, because C++ streams use a dot as default. I need to use comma because the text file is going to be imported into Excel.

I thought that maybe locales could solve the problem.

Unfortunaly, CodeWarrior doesn't seem to support locales, setlocale() returns 0 no matter what language I try to use.

Code:
#include <locale>
#include <iostream>
int main()
{
  std::setlocale( LC_NUMERIC, "swedish" );
  std::cout << 1.2345;
}
In VC++ .NET setlocale seems to work, it returns "Swedish_Sweden.1252", but it doesn't change the decimal separator.
I am able to affect other features, like support for / in touppper()/tolower(), but not the decimal separator.

Is it possible (in theory if the compiler supports it) to change the decimal separator?