Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!grivel!gara!swijaya From: swijaya@gara.une.oz.au (Sastra Wijaya STMA) Newsgroups: comp.lang.c Subject: Convert char to float Keywords: float, char Message-ID: <5051@gara.une.oz.au> Date: 20 Dec 90 23:26:04 GMT Organization: University of New England, Armidale, Australia Lines: 17 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,