Compiler version

Thiago Macieira thiago at kde.org
Thu Jun 28 17:50:42 BST 2012


On quinta-feira, 28 de junho de 2012 13.37.14, Tomaz Canabrava wrote:
> Thiago, on C++ 0 and (void*) 0 are the same thing? I know that on C
> they aren't, and I didn't found the information easily on the web.

No, they are not.

In C++, 0 can be cast to any pointer, but so can 0L and false. However, 
(void*)0 is a null of type void* and that cannot be cast to any pointer type 
except for void *.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      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/20120628/48e2a850/attachment.sig>


More information about the kde-core-devel mailing list