[gnu.g++] extern versus abstract functions

kenny@m.cs.uiuc.edu (01/24/90)

If I have a class with abstract virtual functions, as in

class foo {
	char bar;
public:
	virtual void do_something () const = 0;
};

I can't declare an extern variable belonging to that class:

extern foo zot;

The reason I want to do this is that I'm creating zot in another .cc
file with:

class quux : public foo {
public:
	void do_something ();
} zot;

with the virtual function supplied; I just want to hide zot's derived
class from the users of foo.  (This is primarily for expandability --
I want to be able to derive new classes from foo without having to
recompile the whole world).

It seems to me that there's no problem with accepting the extern
declaration; the compiler isn't actually constructing an instance of
foo, as it would if the `extern' keyword were not supplied.  Am I
missing something?

Kevin	KE9TV