Thanks for your reply.
So far I couldn't achieve anything with fwrite, but I've tried the following:
Code:
FILE *fp;
fp=fopen("numbers.txt", "w+");
fprintf(fp,"%0.0f ", u);
fclose(fp);
(u is the variable i'm trying to write)
But if I run, the output file looks like this:
Code:
′‴‶‵′‵‵‵″‶″‴″″‵′′′‴‱″″″‶′‶‵″‵′″′′‶‵′‴‱′‵‵‵′‴′‶‴‴‴′‱′‴‵′′″‱‶′‶‶‱‱‵′‵″″‶″″′‴″‴‴‴′′″′‵‴″′‴″′′‵‴″‵″‴‴‴′″‱‴‵‶‱‴″‶‱‴″‱‵′‵‱‵′‵″‴′
Can you tell me where my mistake is?
EDIT: If I wirte %1.1f insted of %0.0f it works, even though the numbers all have a .0 (e.g. 5.0 or 4.0), but I can live with that.
Thanks for your help