Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail From: ruben safir Newsgroups: comp.lang.c++ Subject: Re: implicit promotion Date: Mon, 30 May 2011 00:01:34 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Lines: 14 Message-ID: References: NNTP-Posting-Host: www2.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1306728094 16014 96.57.23.82 (30 May 2011 04:01:34 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 30 May 2011 04:01:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:5817 On 05/29/2011 11:35 PM, red floyd wrote: > On 5/29/2011 6:44 PM, Ruben Safir wrote: >> I feel like an idiot asking this, but why does this need a cast >> >> >> float tot = (float)sum/(float)(tally->size()); >> >> > > Depends. What type is sum? What is the return type of > tally->size()? > > ints