From: "POULAIN Vincent" Newsgroups: comp.os.msdos.djgpp Subject: Re: how to convert float ->int? Date: 31 May 1997 01:01:37 GMT Organization: Grolier Interactive Europe Lines: 19 Message-ID: <01bc6d5d$4afb4aa0$LocalHost@vpoulain> References: <01bc6dff$6cbac9c0$10ee13cb AT bbs> NNTP-Posting-Host: ppp-102-132.villette.club-internet.fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk abcEd a écrit dans l'article <01bc6dff$6cbac9c0$10ee13cb AT bbs>... > whats the best way of converting from float to int? I do use a simple way : int a; float b=3.14; a=b; Fine, isn't it ? Only if you want the integer part of your float. If you want a rounded value, this will not work of course :-) Vincent