24 A(
int i) : var(i) { std::cout <<
"Constructor" << std::endl; }
25 A(
const A& a) { std::cout <<
"Copy constructor" << std::endl; }
26 ~A() { std::cout <<
"Destructor" << std::endl; }
51 std::cout << std::endl;
52 std::cout <<
"***********************************************************" << std::endl;
53 std::cout <<
" Normal Constructor : A a(3)" << std::endl;
54 std::cout <<
"***********************************************************" << std::endl;
55 std::cout << std::endl;
59 std::cout << std::endl;
60 std::cout <<
"***********************************************************" << std::endl;
61 std::cout <<
" Copy Constructor : A a2(a)" << std::endl;
62 std::cout <<
"***********************************************************" << std::endl;
63 std::cout << std::endl;
67 std::cout << std::endl;
68 std::cout <<
"***********************************************************" << std::endl;
69 std::cout <<
" Constructor Assignment w/ Function : A a3 = f();" << std::endl;
70 std::cout <<
"***********************************************************" << std::endl;
71 std::cout << std::endl;
75 std::cout << std::endl;
76 std::cout <<
"***********************************************************" << std::endl;
77 std::cout <<
" Constructor Assignment w/ Non Temp Function : A a4 = g();" << std::endl;
78 std::cout <<
"***********************************************************" << std::endl;
79 std::cout << std::endl;
83 std::cout << std::endl;
84 std::cout <<
"***********************************************************" << std::endl;
85 std::cout <<
" Program Finished" << std::endl;
86 std::cout <<
"***********************************************************" << std::endl;
87 std::cout << std::endl;
int main(int argc, char **argv)