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_01.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 a1;
26
27 cout << "initial values after default construction-A() /";
28 cout << endl;
29
30 cout << a1.get_i1();
31 cout << endl;
32 cout << a1.get_i2();
33 cout << endl;
34
35 A *a2;
36
37 a2 = new A;
38
39 cout << "initial values after dynamic default construction-A() /";
40 cout << endl;
41
42 cout << *a2;
43 cout << endl;
44
45 a1.set_i1(4);
46 a1.set_i2(6);
47
48 cout << "updated values - a1 /";
49 cout << endl;
50
51 cout << a1;
52 cout << endl;
53
54 a2->set_i1_i2(3);
55
56 cout << "updated values - a2 /";
57 cout << endl;
58
59 cout << *a2;
60 cout << endl;
61
62 a2->set_i1_i2(1,
63 7);
64
65 cout << "updated values - a2 /";
66 cout << endl;
67
68 cout << *a2;
69
70}