By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,389 Members | 1,881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,389 IT Pros & Developers. It's quick & easy.

Problem installing facets into locales explicitly

P: n/a
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?

--
Med venlig hilsen / Best regards
David List
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.