Re: [gtk-list] Re: Gtk-- versus GTK+



"pixel" <pixel@dotcom.fr> writes:

>     (try to do a :
> 
>     struct something 
>     {
>         (whatever you want)
>     };
> 
>     and 
> 
>     class something
>     {
>         (whatever you want too [the same whatever as the struct one :)])
>     };
>     
>     Then do a sizeof on these (you may be surprised).

Really ? Have you tried this ?

Both will have exactly the same size since the only difference between
the 'struct' and 'class' keywords in C++ is that with 'struct', all
members are public by default while with 'class' they are private.

In other words :

struct foo
{

};

and

class foo
{
public:

};

are strictly equivalent.

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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