aboutsummaryrefslogtreecommitdiff
path: root/week11/Exercise07/Numbers.h
blob: 1219ab07c7a2226f58781f2276473ecd87fce021 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once
#include "DynamicArray.hpp"

class Numbers : DynamicArray<int> {
	// Не можем да имаме полиморфно += (виж DynamicArray.hpp), но пак трябва да го имплементираме
	// по някакъв начин.
	virtual DynamicArray& operator+=(const DynamicArray& other) override;

public:
	virtual int& operator[](int index) override;
	virtual const int& operator[](int index) const override;
	Numbers& operator+=(const Numbers& other);
};