How to do a particular conversion?
Code:
FILE *C;
C = fopen("data2","rb");
??? result; // initiating
int cntr = 0;
for (cntr=1; cntr < last+1;cntr++)
{
fseek(C, sizeof(struct A) * (cntr-1), SEEK_SET); // mod 1
fread(&B,sizeof(struct A),1,C);
result = conversion of B.euros, read from the file, ex a structure, to two-decimal numbers
printf("%????",result); // conversion
getchar();//for trial purposes -- printing
}
I would please like to know how to do the initiating, conversion and printing, etc. The dimension of "result" need not be >= 100,000.00. Making available B.euros from the file is no problem. An example of a value read from the file is 15.75 as char and that format I wish to maintain; i.e., two decimal number so I can do further arithmetic with that number.