ecasey:
The problem is the "#include <iostream>" itself;
the include chain leads to the file:
C:\nburn\gcc-m68k\m68k-elf\include\c++\4.2.1\string
within this I found:
#undef strcoll
#undef strxfrm
which seems not to have been defined before ...
Search found 4 matches
- Fri May 03, 2013 6:38 am
- Forum: NetBurner Software
- Topic: MOD5234 - problem with float-to-string routines
- Replies: 12
- Views: 17362
- Thu May 02, 2013 5:56 am
- Forum: NetBurner Software
- Topic: MOD5234 - problem with float-to-string routines
- Replies: 12
- Views: 17362
Re: MOD5234 - problem with float-to-string routines
I tried some of your hints, for example:
volatile float fValue = 0.1;
float fValue 0.1f;
double fValue 0.1;
but to no avail.
I tried to include iostream to be able to use cout,
#include <iostream>
cout << fValue;
but 1 got a compiler error message:
In file included from c:\nburn\gcc-m68k\bin ...
volatile float fValue = 0.1;
float fValue 0.1f;
double fValue 0.1;
but to no avail.
I tried to include iostream to be able to use cout,
#include <iostream>
cout << fValue;
but 1 got a compiler error message:
In file included from c:\nburn\gcc-m68k\bin ...
- Tue Apr 30, 2013 3:35 am
- Forum: NetBurner Software
- Topic: MOD5234 - problem with float-to-string routines
- Replies: 12
- Views: 17362
Re: MOD5234 - problem with float-to-string routines
Well, I created a new project which does nothing but the test output, which is o.k.; so I have to find out what's in my other projects, that corrupts the memory. Since no one else seems to have the problem, I assumed yet the problem is on the side of my program. But since it happened everywhere I ...
- Mon Apr 29, 2013 1:12 am
- Forum: NetBurner Software
- Topic: MOD5234 - problem with float-to-string routines
- Replies: 12
- Views: 17362
MOD5234 - problem with float-to-string routines
Hello!
I have a strange effect when using standard routines to output a float value: if the value is in the range -1< fValue < 1, the leading "0" shows as "2" (or as "7", in another project). Example:
float fValue = 0.1;
printf("Value = %5.3f \n", fValue);
would produce the output:
Value = 2.100 ...
I have a strange effect when using standard routines to output a float value: if the value is in the range -1< fValue < 1, the leading "0" shows as "2" (or as "7", in another project). Example:
float fValue = 0.1;
printf("Value = %5.3f \n", fValue);
would produce the output:
Value = 2.100 ...