I just found a problem when using "printf" function in Open C using N95. If anyone can help me, please advice.
Say I want to display some vairables' value with the following code:
double x = 9.0
float y = 8.005;
double z = 4.01;
printf("x = %f \n", x);
printf("y = %f \n", y);
printf("z = %f \n", z);
Instead of showing the exact value, the output is actually shown as the following:
x = 9..000000
y = 8..050000
z = 4.0100000
For some reason, two dots are displayed for some variable (i.e. x and y).
You can easily repeat the problem. Just create a regular symbian project in Carbide C++ and then put the above code somewhere. I put the code in the application view constructor.
The same problem also occurs when using fprintf(), which prevents me from saving float point data into a text file correctly. If anyone can give me some advice, I'd be very thankful.