about summary refs log tree commit diff
path: root/lang/cpptour/abstract.h
blob: 71191d968f64549bc844039eabbc44c6580917c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "Vector.h"

class Container {
public:
  virtual double& operator[] (int) = 0;
  virtual int size () const = 0;
  virtual ~Container () {}
};

class Vector_container : public Container {
  Vector v;
public:
  Vector_container (int);
  ~Vector_container ();

  double& operator[] (int);
  int size () const;
};