c++ question.

Thiago Macieira thiago at kde.org
Fri Sep 3 06:46:19 BST 2010

On Thursday 2. September 2010 22.36.02 Tomaz Canabrava wrote:
> >   I do not know what this methods do,
> >   They use a [-1] array index, perhaps to do pointer arithmetic?, but
> no pointer aritimetic. it's just that the -1 is actually the biggest
> number  you can find using an unsigned int. so, it's 0xFFFFFFFFFFFFFFFFFFF
> ( or something near =p )

Actually, it's both.

-1 is the highest possible unsigned number, but in this case it's used as a 
negative index.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100903/e23dbf25/attachment.sig>

More information about the kde-core-devel mailing list