I am trying to implement abstract factory in c++, but i encountered one problem that compiler doesn't allows me to this:

class Temp
virtual void dr=0; //error is in this line


it says illegal use of type void !!
i can use other return types but i want to know whats wrong with this .


dr isn't a member function...there's a lot more wrong here than void.

class Temp{
 virtual void dr() = 0;