1/*
2 Copyright(C) 1998
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 : January 1, 1998.
11 author : Salih Yurttas.
12
13 T_A.h
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21template<class T, int v>
22class T_A {
23public:
24 T_A();
25
26 T_A(const T_A&);
27
28 T_A<T,v>& operator=(const T_A&);
29
30 virtual ~T_A();
31
32 virtual int get_s() const;
33
34 virtual T get_d(const int) const;
35
36 virtual T* get_d() const;
37
38 virtual void set_d(const int); // size with default value=0
39
40 virtual void set_d(const int,
41 const T);
42
43 template<class U, int i> // this syntax changed several times
44 friend ostream& operator<<(ostream&,
45 const T_A<U,i>&);
46
47protected:
48 int s;
49 T* d;
50};