Virtual and override
so why not just simply code the method in the derived class and not on the base class ?
C isn't object oriented, it doesn't have polymorphism. If you meant C++ or C#, you need to declare polymorphic functions in the base. Then code that uses the base class can call polymorphic methods.
i meant for the c# sorry for that confusing tag