Both errors are related to virtual. The latter is the case of the parent class.

And these errors, once they occur, are associated. So let’s go to the original one, solve it and compile it.

After a long analysis, I found that virtual functions that are superclasses must be written like this:

virtual void read()  = 0;
virtual void write() = 0;
Copy the code

Huh? Why not write it this way? Why is that? I remember that =0 means that subclasses must be implemented. Can’t I just do it?

I’ve always found it a bit…