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 a_00.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "A.h"
22
23int main(int argc, char* argv[]) {
24
25 A a_0;
26
27 cout << "initial values after construction-A(int) /" << endl;
28 cout << a_0 << endl;
29 cout << endl;
30
31 int* aa = new int[2];
32
33 aa = a_0.get_d();
34
35 cout << "aa after a_0.get_d() /" << endl;
36 for(int i=0; i<2; ++i)
37 cout << aa[i] << endl;
38
39 cout << endl;
40
41 a_0.set_d(9);
42
43 cout << "a_0 after updated by (9) /" << endl;
44 cout << a_0 << endl;
45 cout << endl;
46
47 A a_1(a_0);
48
49 cout << "initial values after construction-A(A&) /" << endl;
50 cout << a_1 << endl;
51 cout << endl;
52
53 a_1.set_d(3,7);
54
55 cout << "a_1 after updated by (3,7) /" << endl;
56 cout << a_1 << endl;
57 cout << endl;
58
59 a_1.set_d(aa);
60
61 cout << "a_1 after updated by (aa) /" << endl;
62 cout << a_1 << endl;
63 cout << endl;
64
65 a_1 = a_0;
66
67 cout << "a_1 after a_1=a_0 /" << endl;
68 cout << a_1 << endl;
69 cout << endl;
70
71 cout << "a_0 after a_1=a_0 /" << endl;
72 cout << a_0 << endl;
73 cout << endl;
74
75}