heredar constructor c++ code example
Example: heredar constructor c++
class Bar {
public:
Bar(int weight, int height);
}
class Computer: public Bar {
public:
Computer(int weight, int height): Bar(weight, height) {};
};
class Bar {
public:
Bar(int weight, int height);
}
class Computer: public Bar {
public:
Computer(int weight, int height): Bar(weight, height) {};
};