| delorie.com/archives/browse.cgi | search |
| From: | kurt DOT skauen AT funcom DOT com (Kurt Skauen) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Return Types for Constructors |
| Date: | Tue, 09 Dec 1997 09:43:33 GMT |
| Organization: | Funcom Oslo AS |
| Lines: | 36 |
| Message-ID: | <66j3qt$98b$1@araga.funcom.com> |
| References: | <01bd0366$cfe6d140$d744e4cf AT cadvision DOT com> <348BA5D2 DOT 503C AT rug DOT ac DOT be> <348c4260 DOT 323656 AT news DOT eunet DOT be> |
| Reply-To: | kurt DOT skauen AT funcom DOT com |
| NNTP-Posting-Host: | aga.funcom.com |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Dominique DOT Biesmans AT nospam DOT ping DOT be (please remove the nospam part)
(Dominique Biesmans) wrote:
>
>To the original poster : post your header declaration, otherwise
>something like this should always work :
>
>// declaration
>class A
>{
>// ...
>public:
> A(): // default constructor
>// ...
>}
>
>A::A()
>{
> // implementation
>}
>
No, it will not. This will propably emit
"return type specification for constructor invalid"
since you forgot to put a semi-colon at the end of the class
declaration. This will lead the compiler to think that the constructor
A::A() returns an instanse of class A.
/* kurt
*
* If the second was twice as long P400 would
* have been state of the art in year 998!
*/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |