Re: [gtkmm] behavior modification of input/output functions



On Tue, 2004-07-20 at 20:38, Florent Teichteil wrote:
[snip]
> 1) First test with 3.56 :
> 
> p = 3.56
> p = 3,000000
> 
> 2) Second test with 3,56 :
> 
> p = 3,56
> p = 3,560000
> 
> I was very surprised since I should obtain the opposite result.
>
> Indeed, the same piece of code in a console application returns the
> opposite results :
> 
> 1) First test with 3.56 :
> 
> p = 3.56
> p = 3.560000
> 
> 
> 2) Second test with 3,56 :
> 
> p = 3,56
> p = 3,000000
> 
> Therefore, I think that gtkmm modifies the behavior of the functions of
> <cstdio>. If so, how can I prevent this modification ?
[snip]

You should check the locales (using the locale command) on the console
and on the terminal. You will probably find out that you have different
locales set, which will modify the way the numbers are parsed.

Tassos
-- 
Tassos Bassoukos <abas isag meng auth gr>
ISAG, AUTh




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]