Mozo40 wrote:
and this the code that calls the printf to puts the number:
Code:
unsigned i = 1.8;
DebugPrintf("---%f----",i);
-----------------------------------
Thank you in advance
it should be "float i = 1.8" / "double i = 1.8"
I am sorry to say you, but I strongly suggest you to learn basics first before progressing.
I found the following mistakes in your code.
1. using uninitialized pointer
part1[f] = (int)c[f];
2. looks like you are not very familier with va_arg (or variable number of arguements)
case 'f':
{
unsigned* c = va_arg (args, unsigned*);
/* you are intended receive a double (not float too) value here for "%f".
as the format specifier f stands for - Print a double in normal (fixed-point) notation */
3. trying to display something in a loop.
for (int y = 0 ; y < 70 ; y++)
{
if (c[1] == '-')
{
DebugPuts("-");
}
...
}
intentionally doing this? then ignore my comment.
Thanks
Prasad JVV.