I don't understand how inheritance works entirely. I'm trying to make a program that counts the number of comparisons that a sort makes using a virtual class but I'm getting the error "cannot declare variable 'q' to be of abstract type 'childsort'. and I don't understand why I can't declare that variable.
I think I figured it out but I would like some conformation from someone who knows better. Removing the const tag on line 18 allowed me to create a child class but I'm wondering does that mean you can't edit a child function at all if the parent function is set to const or does that mean you can't edit specific things inside the child function? Or is it some other thing I'm missing?