Re: The plus plus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-11-10 at 14:10 +0000, Andy Green wrote:

> About ten years ago when I was struggling to understand what the C++ 
> deal was about, I realized after it crashed in on me what the benefits 
> were (the moment I understood how virtual functions worked in the memory 
> footprint) that I had been blindly reaching for some of the same 
> principles in my C for some time, eg, binding related data into structs, 
> composing structs with other more primitive structs at the start, making 
> the equivalent of constructor functions to prep a struct, using function 
> pointers and so on.

I always thought your basic data type in C should be "array of struct" 
regardless of the actual elements you plan to use. Otherwise the
semantics don't make sense when you start storing things in allocated
or shared memory.  You don't need C++ for that - it has been there
from the beginning.

-- 
 Les Mikesell
   lesmikesell@xxxxxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux