From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Static member functions in constructor Date: Tue, 03 Jun 1997 19:06:19 -0700 Organization: Alcyone Systems Lines: 23 Message-ID: <3394CD9B.7AB9AC1B@alcyone.com> References: NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk A.V. Kondratiev wrote: > In case (1) the compiler reports that F1 is not defined. GCC doc > tells that `g++' reports as undefined symbols any static data > members that lack definitions. But I provided definition for F1! The reason is because at the time of the declaration of A::A(ft), the class A is incomplete; you can see this if you were to attempt declare the member function as A(ft f = &A::F1): pf(f) { } which is the more complete form -- you'll get the error "incomplete type `A' does not have member `F1'." Unfortunately, you're forced to use your second case or the equivalent. -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "Covenants without the sword / are but words." / Camden