Convert char to float
Sastra Wijaya STMA
swijaya at gara.une.oz.au
Fri Dec 21 10:26:04 AEST 1990
I need to know how to convert a char variable into a float. The problem
arises from calculating the elapsed time. First I get dosstampped of the
beginning process and the end process. The time I got from _dos_gettime(&tm),
the variable tm is a struct of char.
What I did is:
elapsed = (tm2.hour-tm.hour)*3600+(tm2.minute-tm.minute)*60+(tm2.second-tm.second) + (tm2.hsecond-tm.hsecond)/100;
I use MSC 5.10
Thanks for all your help,
Best Regard,
Sastra,
More information about the Comp.lang.c
mailing list