From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: plunket@eidetic.kom (Tom Plunket) Subject: Re: C++ Class [ not a good answer ] Date: 1997/03/06 Message-ID: <331f372f.64959731@news.teleport.com>#1/1 X-Deja-AN: 223609484 Sender: -yp- @bend86.transport.com References: <33018394.1718@scf.usc.edu> <5dsgh1$hlt@nnrp1.farm.idt.net> <331B1B88.612E@solix.fiu.edu> Organization: Eidetic, Inc. : http://www.eidetic.com Reply-To: plunket@eidetic.com.anti-spam Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-03-06T00:00:00+00:00 List-Id: On Mon, 03 Mar 1997 13:42:16 -0500, Luis Espinal wrote: > Lock Minh, what you need is a class that has at least one pure virtual > function in it. That way, nobody can instantiate an object from it and > still use it as a base class. > .ie. > > class MyBase > { > MyBase(){...} > virtual ~MyBase(){ ... } > virtual void SomeFunction() = 0; // a pure virtual function. > }; > > // you still need to implement the pure virtual func. > void MyBase::SomeFunction(){} Can't you just create a pure-virtual class, that doesn't have pure-virtual member functions (if indeed you don't want that)? I thought that that was what class ios did. Something along the lines of: class CSomeVirtual { CSomeVirtual(); ~CSomeVirtual(); MemberFunction(); AnotherMemberFunc(); } = 0; ??? Then you're forced to derive from it, but everything is implemented, too. -Tom