Base Constructor Call in Derived Class
问题 I have got the following problem in a homework for university, the task is as follows: Derive a class MyThickHorizontalLine from MyLine . One requirement is that the constructor of the derived class MyThickHorizontalLine does not set the values itself, instead its obligated to call the base constructor. Which currently looks like this in my cpp file: MyThickHorizontalLine::MyThickHorizontalLine(int a, int b, int c) { MyLine(a, b, c, b); } This is my Base constructor: MyLine::MyLine(int x1,