🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12240

Re: Convert int to double

#12240
From: Remy Lebeau (TeamB)
Date: Wed, 17 Dec 2003 05:33
16 lines
1285 bytes
"Peter Rees" <peter@NOOSPAMMrees.co.nz> wrote in message
news:3fdfde83$1@newsgroups.borland.com...

> I don't use float/double very often and have forgotten how to convert the
> data type. Can I safely convert an unsigned int to double by simply
casting
> it;

You don't even need the cast, the C++ language already knows how to do the
conversion:

    double dDouble = uiInt ;


Gambit
Technical Details
Message-ID: <3fdfebab$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fdfde83$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,93b2ecce2721f7fe
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-16 21:39:25 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fdfde83$1@newsgroups.borland.com>
Subject: Re: Convert int to double
Date: Tue, 16 Dec 2003 21:33:43 -0800
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.139.199
Message-ID: <3fdfebab$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071639467 67.22.139.199 (16 Dec 2003 21:37:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail