inheritance and initializer list in c++

class Triangle

As seen in the picture above: class Triangle inherits from class Shape but why is there written Shape() in the initializer list and what happens if I leave it out?



Read more here: https://stackoverflow.com/questions/67389781/inheritance-and-initializer-list-in-c

Content Attribution

This content was originally published by ykiwi at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: