D
David List
I seem to have a problem installing facets into locales explicitly. It
is not clear to me whether the problem is my compiler, my environment
or my code.
I am trying out some code from Langer/Kreft's iostream book. Here is
an example:
----------main.cpp----------
#include <string>
#include <locale>
#include <iterator>
using namespace std;
int main()
{
locale loc(locale("German"), new num_put<char,
back_insert_iterator<string> >);
}
----------main.cpp----------
This one sentence alone compiles, but gives me a segmentation fault
when run. The code is from the Langer/Kreft book page 308 (only the
first sentence in the example).
What could cause this problem?
is not clear to me whether the problem is my compiler, my environment
or my code.
I am trying out some code from Langer/Kreft's iostream book. Here is
an example:
----------main.cpp----------
#include <string>
#include <locale>
#include <iterator>
using namespace std;
int main()
{
locale loc(locale("German"), new num_put<char,
back_insert_iterator<string> >);
}
----------main.cpp----------
This one sentence alone compiles, but gives me a segmentation fault
when run. The code is from the Langer/Kreft book page 308 (only the
first sentence in the example).
What could cause this problem?