www.digitalmars.com         C & C++   DMDScript  

c++ - Abstract class creation

reply Dimitri Kaparis <dkaparis universalstudyhelper.com> writes:
With Digital Mars version 8.38.9n:

class A
{
	virtual void m1()=0;
};

int main()
{
	A();
}

Creation of abstract classes is allowed as temporaries.

Regards,
Dimitri
Apr 26 2004
parent "Jackson" <fangzhengzhu kingsoft.com> writes:
But visual C++ won't let it pass, the pure virtual function is not
defined...
"Dimitri Kaparis" <dkaparis universalstudyhelper.com>
??????:c6ii59$26s2$1 digitaldaemon.com...
 With Digital Mars version 8.38.9n:

 class A
 {
 virtual void m1()=0;
 };

 int main()
 {
 A();
 }

 Creation of abstract classes is allowed as temporaries.

 Regards,
 Dimitri
Aug 30 2004