1/*
2 Copyright(C) 2007
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : December 1, 2007.
11 authorĀ : Salih Yurttas.
12
13 T_V.h
14*/
15
16
17#include <iostream>
18#include <vector>
19
20using namespace std;
21
22template<class T>
23class T_V {
24public:
25 T_V();
26
27 T_V(const T_V<T>&);
28
29 T_V& operator=(const T_V<T>&);
30
31 virtual int get_size() const;
32
33 virtual T get_d(const int) const;
34
35 virtual vector<T> get_d() const;
36
37 virtual void set_d(const int); // size with default value=0
38
39 virtual void set_d(const int,
40 const T);
41
42 template<class U> // this syntax changed several times
43 friend ostream& operator<<(ostream&,
44 const T_V<U>&);
45
46protected:
47 vector<T> d;
48};