Results 1 to 18 of 18

Thread: QByteArray sum

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: QByteArray sum

    There is no native 8-bit integer type. Qt provides quint8, which is guaranteed to be an 8-bit unsigned value on any platform, but it's effectively an unsigned char type. So, use quint8 or an unsigned char if you *must* compute the sum using a single byte.

    In my opinion, using an integer type for the sum and computing the remainder using sum % 256 is more straight forward in my opinion.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  2. The following user says thank you to jefftee for this useful post:

    FalloutST (3rd April 2017)

Similar Threads

  1. Replies: 6
    Last Post: 14th May 2014, 12:14
  2. Replies: 1
    Last Post: 22nd June 2011, 08:12
  3. Regarding qbytearray
    By mohanakrishnan in forum Qt Programming
    Replies: 7
    Last Post: 19th November 2009, 13:38
  4. Replies: 9
    Last Post: 25th July 2009, 13:27
  5. QByteArray in Qt3
    By joseph in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2007, 06:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.