Question: double2string

Question: double2string

Post by Cecil A. Galbrait » Mon, 04 Nov 1996 04:00:00




> Hello!

> I need to convert a double into a string with specified format under
> MFC. Can someone out there help me?

> thanx & cus,
>   Tobi

Check out sprintf()...

--
Cecil Galbraith

CustomSoft

Download free programmers utilities at
http://www.concentric.net/~cgalbrai/

 
 
 

Question: double2string

Post by Keith Benedic » Tue, 05 Nov 1996 04:00:00


Tobi,

It should be pretty simple.  Try this:

CString szWasDouble;
double  dNumToConvert;

szWasDouble.Format("%lf", dNumToConvert);

You could probably wrap this in a function like this:

CString DoubleToString(double dNumToConvert)
{
        CString szWasDouble;

        szWasDouble.Format("%lf", dNumToConvert);

        return szWasDouble;

Quote:}

--
Keith Benedict
Software Engineer
Triad Systems



: Hello!
:
: I need to convert a double into a string with specified format under
: MFC. Can someone out there help me?
:
: thanx & cus,
:   Tobi
:
:

 
 
 

1. Questions.questions.questions on Win95 and NSCP 4.03

Ok.  Here are the thoughts that are making me lose sleep
at night.  Hope you can help:

1.  How do I know if I have an original Win95 or OSR2 ?

2.  Using NSCP 4.03 and Win95, netscape does not recognize
    midi files (filename.mid).  It asks for a plug-in or
    interprets the file as txt.   My NSCP 3.02G has no problem
    reading the same web page and playing the midi file as usual.

3.  That F&*^%$# password problem is a real hassle.  Nothing on
    any of the web pages helps.  Problem is ok on a standard PC,
    but one with both an Ethernet card and modem means I retype
    dialup username/password every time.  Yes...I've been to
    Windows95.com and a host of other "Password List" help pages
    to no avail.  

4.  Is NT4.0 better than Win95 if I'm basically using my system
    as a surf-n-go machine with light spreadsheets.  I dont have
    any DOS programs anyway, 'sept a cool dos-based text editor.

thanks,
Joe

2. email address

3. Might be a MSWord question, but I'll give it a ago, Spelling ABC question.

4. Need help with Cd rom and win 3.1

5. Novice Questions and/or Questions from a Novice !!!

6. autoshut down

7. Repost of Defrag question and unanswered questions

8. problems getting from dos to windows95

9. Uninstalling backup files question please - one last question for Alex N...

10. pcAnywhere 10 Question & Radeon LE Question

11. DVD+RW drive question question

12. Excel worksheet question concerning cell validation and other questions

13. shut down question and xp updates question