LWN.net Logo

Day: GNOME OS

Day: GNOME OS

Posted Aug 10, 2012 14:59 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)
In reply to: Day: GNOME OS by jwakely
Parent article: Day: GNOME OS

You can always do:
>int *p = reinterpret_cast<int*>(malloc(n*sizeof(int))


(Log in to post comments)

Day: GNOME OS

Posted Aug 10, 2012 15:51 UTC (Fri) by jwakely (subscriber, #60262) [Link]

How would that be valid C?

Day: GNOME OS

Posted Aug 10, 2012 16:54 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

It's not, and that's the point. C++ could have avoided lots of warts caused by C-compatibility without losing in functionality.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds