Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!ads.com!potomac!jtn From: jtn@potomac.ads.com (John T. Nelson) Newsgroups: comp.sys.mac.programmer Subject: Re: And now a question about OOPs and LSC Message-ID: <9189@potomac.ads.com> Date: 24 Sep 90 19:58:46 GMT References: <9184@potomac.ads.com> Reply-To: jtn@potomac.UUCP (John T. Nelson) Organization: Advanced Decision Systems -- Arlington, Va Lines: 40 In article phils@chaos.cs.brandeis.edu (Phil Shapiro) writes: >If you have *any* method that's not defined for a class, you will get >link errors for the entire class (I believe). Therefore, if you have >a method declared in some superclass that's not defined, none of its >subclasses will link properly. This seems to be the case, and the *only* method for which there wasn't a definition was "constructor." I defined "constructor" as follows in the subclasses and everything linked fine. What bugs me is that "constructor" is supposed to be defined and inherited from the superclass whenn the subclass is defined. struct A_Class : Superclass { void *constructor(void); void moreMethods(void); }; A_Class should get Superclass's constructor yet in my project it doesn't so I define the following for A_Class: void A_Class::constructor() { this = inherited::constructor(); return this; } and the linker is happy. This SHOULDN'T be necessary though! -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ORGANIZATION: Advanced Decision Systems GEOGRAPHIC: Arlington, VA UUCP: kzin!speaker@mimsy.umd.edu INTERNET: jtn@potomac.ads.com SPOKEN: Yo... John! PHONE: (703) 243-1611 PROJECT: The Conrail Locomotive/Harpsichord Fusion Program =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=