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 P.h
14*/
15
16
17#ifndef P_H
18#define P_H
19
20template<class T>
21class P {
22public:
23 P();
24
25 P(const P<T>&);
26
27 virtual P<T>& operator=(const P<T>&);
28
29 virtual vector<T> get_a() const;
30
31 virtual void set_a(const int, // index
32 const T); // value
33
34 virtual void set_a(const vector<T>&);
35
36 template<class U> // this syntax changed several times
37 friend ostream& operator<<(ostream&,
38 const P<T>&);
39
40protected:
41 vector<T> a;
42};
43#endif