Код: Выделить всё
// multiple inheritance
#include
using namespace std;
class Polygon {
protected:
int width, height;
public:
Polygon (int a, int b) : width(a), height(b) {}
virtual int area()=0;
virtual void print(){
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/29979527/why-is-my-member-function-treated-like-virtual-when-it-is-not-declared-as-such-i[/url]
Мобильная версия