473,473 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

[VC++ 7.1] global locale problem

Hi!

My problem looks like this:

#include <locale>
#include <iostream>

int main()
{
std::locale::global( std::locale( "deu" ) ); // or "german"
std::cout.imbue( std::locale() );
std::cout << 1000.4 << " " << 0.4 << std::endl;
return 0;
}

Output is:

1,000.4 0,4

Now, this is confusing! I really expected (in german locale)

1.000,4 0,4

Any suggestions?

Regards,
M. Kluwe

Nov 17 '05 #1
0 862

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mohammed AlQuraishi | last post by:
Hi all, I'm trying to connect to an MS Access database using ADO.NET and C#, but I'm getting the dreaded "Microsoft Jet database engine cannot open the file 'x'. It is already opened exclusively...
5
by: Hari | last post by:
Guys please help me to solve this strange problem what Iam getting as follows.. Trying to instantiate a global instance of a template class as follows :- when i build this code with debug and...
10
by: Adriano Coser | last post by:
Hello. I'm moving an application VC 2003 to VC 2005 Beta2. I need to set STA ApartmentState model so the drag & drop registration can work. I used to do...
0
by: kaypohsingaporean | last post by:
Hi all, I am porting VC++6 code to VC++8/2005. Here's the original code: (I have replaced the greater than sign with &gt; because this forum's parser doesn't like it) template < class CharT,...
4
by: Minfu Lu | last post by:
Hi, I need define a global COM object in a VC++8 project. But when I compile it, I get a error message: error C3145:'ComLibC1': global or static variable may not have managed type...
37
by: eoindeb | last post by:
Sorry to ask another global variable question, but from reading other posts I'm still not sure whether to use them or not. I have a program with a set function that calls 4 other functions in...
2
by: cris | last post by:
Hi, I got trouble when I try to change the locale used in a program foo.cc // ----------------- begin #include <iostream> #include <locale> #include <exception> using namespace std; int...
2
by: year1943 | last post by:
There was the same topic not so long ago, but as I see it stays w/o answer:...
5
by: Saeed Amrollahi | last post by:
Dear all Hi I am Saeed Amrollahi. I write C++ programs using VC++ 2005 CLR/CLI. I have two problems: 1. How to declare/define and use global ref class objects? For example for database...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.