CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    15

    Moving a double bit pattern to _int64

    I need to create subroutines for high precision floating point operations and am stymied with an inability to move the bit pattern in a double to a _int64 or character array.

    I tried to use a union but get "error C3923: 'Orbital::Form1::PDoubtoBig::$UnnamedClass$0x141c2c58$1$' : local class, struct or union definitions are not allowed in a member function of a managed class

    Maybe an answer would be to use an unmanaged class but that would create all sorts of problems with the rest of my forms program as well as exceed my knowledge on how it could be done.

    I tried to "and" the double with a hex integer such as 0x8000000000000000 to piecemeal the bits out of the double but get "error C2296: '&' : illegal, left operand has type 'double'"

    Is there a fuction that will do this for me or a way to work aroud it?

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Moving a double bit pattern to _int64

    Just create global unmanaged function and call it from managed function. Use #pragma unmanaged for this.

  3. #3
    Join Date
    Feb 2010
    Posts
    15

    Re: Moving a double bit pattern to _int64

    Thanks Alex.
    I didn't realize you could do that.
    It seems to work.

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