Article View: comp.std.c++
Article #1528Re: struct with constructor?
From: Ramesh S
Date: Mon, 31 Jul 1995 12:37
Date: Mon, 31 Jul 1995 12:37
28 lines
1123 bytes
1123 bytes
In article <3v2edj$n6u@dub-news-svc-6.compuserve.com>, 71754.2053@compuserve.com (Wayne Conrad) says:
>
>>Can I declare a constructor and a destructor for a structure (struct {})?
>
>Yep.
>
>The difference between a struct and a class in C++ is very simple. In
>a class, members start out being private unless you say otherwise with
>the "public:" or "protected:" keywords. In a struct, members start
>out being public unless you say otherwise with the "private:" or
>"protected:" keywords.
>
>As far as I know, that's the only difference between a class and a
>struct.
>
The same reason holds good for the derivation signature also.
- Ramesh
Technical Details
Message-ID:
<3viiq2$6aa@mloeff01.elec.mid.gmeds.com>Path:
arc1-ca.pugleaf.net!news.elec.mid.gmeds.com!usenetReferences:
<3uvqfv$c74@taiwan.informatik.uni-rostock.de> <3v2edj$n6u@dub-news-svc-6.compuserve.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.elec.mid.gmeds.com!usenet From: rameshs@ix.netcom.com (Ramesh S) Newsgroups: comp.std.c++ Subject: Re: struct with constructor? Date: 31 Jul 1995 12:37:22 GMT Organization: General Motors Corporation Message-ID: <3viiq2$6aa@mloeff01.elec.mid.gmeds.com> References: <3uvqfv$c74@taiwan.informatik.uni-rostock.de> <3v2edj$n6u@dub-news-svc-6.compuserve.com> NNTP-Posting-Host: 130.175.185.59 X-Newsreader: WinVN 0.92.5