CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 20

Threaded View

  1. #1
    Join Date
    Feb 2001

    double to String conversion, better way?

    I need to convert from a double value to an architectural string format. EG:

    25.875 ->> 25'-10 1/2"

    To do this, I have written the following code, but I am not sure about it although it seems to work.

    I thought I would post the code for any possible improvement suggestions:

    Code Removed!
    On second thought, I will attach a CEdit derived class I use that converts the value from a real (double) to a string (in imperial) as required.

    Take a look if you are interested.

    its ugly I know!

    Any suggestions.

    Mike B
    Last edited by MikeB; October 23rd, 2003 at 03:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.