Hi here i am going to explain what i understood from the copy constructor theory.
See the following example
1 class AClass
2 {
3 public:
4 int val;
5 AClass()
6 {
7 cout<<"In Constructor"<<endl;
8 };
9 AClass(AClass objA)
10 {
11 cout<<"In Copy Constructor"<<endl;
12 val = objA.val;
13 }
14 };
15
16 int main()
17 {
18 AClass obA;
19 AClass obB(obA);
20 }
Assume there no compiler errors and warnings regarding to copy constructor.In the example copy constructor with call by value is declared in line 9.Now in line we are calling copy constructor function(you can assume it as function) with argument obA.So your obA has to be copied in order to pass it as argument, so
again compiler has to call copy constructor.So this process will go into infinite loop.This was what i understood. Hope this will help you to think in your own way.
Removed an & in the "copy by value ctor prototype making it anymore a value ..."
Emilio