I was reading a book when I saw virtual void enter()=0; What does the asignment do while it is not a variable?
class MapSite {
public:
virtual void Enter() = 0;
};
I was reading a book when I saw virtual void enter()=0; What does the asignment do while it is not a variable?
class MapSite {
public:
virtual void Enter() = 0;
};
That code is not C#, it is C++, and is the equivalent to C#
abstract class MapSite
{
public abstract void Enter();
}
It makes the function pure virtual, and the class abstract. Subclasses will be abstract as well unless they provide a definition for the member function void Enter()