On Thursday 22 January 2004 20:49, Scott Wunsch wrote:
> On Thu, 22-Jan-2004 at 09:31:11 -0800, Justin Mason wrote:
> > >Not quite - a class can have a private constructor the difference is
> > >that in a class, members are private by default; in a struct they
> > >are public.
> >
> > Can you subclass a struct? I didn't think so.
>> Yes. In C++ (remember, C++, not C) a "struct" is just another word for a
> "class". The only difference is that members of a class declared using the
> "struct" keyword are public by default, but if you declare it with the
> "class" keyword, they're public.
>> A struct in C++ is *not* the same thing as a struct in C. That's the
> trick to this trick question.
>
True, a struct in C++ is not the same as a struct in C, unless the said struct
only uses features available in plain old C.
> --
> Take care,
> Scott \\'unsch
>> ... Ground Water? Do you mean crushed ice?
--
John Allen, Email: mailto:john.allen at orbiscom.com
Orbiscom Ireland Ltd, Web: http://www.orbiscom.com/
Orbiscom House, Direct: +353-1-2178610
3 Arkle Road, Office: +353-1-2945111
Sandyford Ind Est, Fax: +353-1-2945119
Dublin 18,
Ireland.
Disclaimer: The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use disclosure copying or alteration of this message is strictly forbidden. This message and any attachments have been scanned for viruses. Orbiscom Ltd. will not be liable for direct special indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on. www.orbiscom.com
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!