×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jul 2004
    Location
    Nanjing, China
    Posts
    74

    Put an integer into the TDes by bytes

    I want to put an integer into a TDes, it tooks 4 bytes, how can i do this? also want from the first 4 bytes in a TDes to an integer.

    Thanks a lot.
    Last edited by vacheldai; 2004-08-18 at 12:42.

  2. #2
    Regular Contributor
    Join Date
    Jul 2004
    Location
    Nanjing, China
    Posts
    74
    Anyone can help me? Thanks.

    vachel

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    There are two classes that can help: BigEndian and LittleEndian
    and their methods Get32() and Put32()...

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    6
    i think you can use this function Mem::copy()

  5. #5
    Regular Contributor
    Join Date
    Jul 2004
    Location
    Nanjing, China
    Posts
    74
    Thanks, and how can i do the same with TUnit8 ? For example: put 127 into TDes and take 1 byte.

Posting Permissions

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