Because otherwise you will pass the object to copy as an argument of copy constructor as pass by value which by definition creates a copy and so on... an infinite call chain....Do you see that-Prashant
Because otherwise you will pass the object to copy as an argument of copy constructor as pass by value which by definition creates a copy and so on... an infinite call chain....
well i dont feel thats the exact reason..., the reason stated by sneha is true if i ask why the argument of copy constructor is passed as a reference ...the reason for constant is that in copy constructor u never need to change the value of the passed object so to avoid accidental change it is passed as constant .....
const access specifier lets the constructor accept temporary objects that may be returned from another function. Temporary objects by default are constants and hence if const is not specified argument may not be accepted by the compiler. Not sure if all compilers does this.