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

Threaded View

  1. #6
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: float casting problem

    I would like to see a REAL number (a little pun intended).
    What was passed in, what do you observe in a Watch window, and what you are getting as a result.
    BTW, in your original post, the code makes no sense. You first type-convert your float to the int (it’s OK if you can tolerate truncation), then type-cast pointer-to-int to pointer-to-float (VERY rarely a good idea).
    Last edited by VladimirF; October 13th, 2009 at 01:26 PM. Reason: Restored the original post for consistency of this thread.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured