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

Thread: VB to C

Threaded View

  1. #2
    Join Date
    Jul 2002
    Location
    Portsmouth. United Kingdom
    Posts
    2,727

    Re: VB to C

    Using standard C

    Use sscanf with convertion parameter %X or strtol to convert the hex strings to numbers.
    Use pow to raise the base with the exponent.
    Use % to mod the number.
    Use sprintf with convertion parameter %X to convert the number back to a hex string.
    Your C code will be very small compared to the VB you posted.
    Last edited by JohnW@Wessex; January 31st, 2008 at 06:59 AM.

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