|
From: Bolek <vr...@pa...> - 2001-02-26 13:33:19
|
Hi,
I have never used the Dev-CPP debugger or debugging facilities so I am
sorry if this is a nonsense. However, it might be the compiler uses
registers for i and f. Try to get addresses of these variables, for
example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
int main(int argc, char *argv[])
{
float f;
char string[34], ch;
int i;
scanf( "%lf %d", &f, &i); /* ADD THIS LINE */
f = 2653.1456;
itoa((long)f,string,10);
i = strlen(string);
printf("Decimal point is %d places", i);
i = i*10;
f = f/i;
return 0;
}
This should force the compiler to create them in memory.
--
============================================================
Ing. Boleslav Vrany
Stanice techniku DDM hl. m. Prahy
Pod Juliskou 2a
Praha 6 - Dejvice
16000
Czech Republic
tel. (420 2) 243 10 240
|