A copy constructor is needed in order to initialize this object with a copy of the input object. Event if your 'other constructor' (i.e.
A(int tmp)
) do basically the same, the compiler doesn't know that and won't use it.
For instance, without a copy constructor. you couldn't do the following:
A a1;
A a2(a1);
(nor even:
A a2=a1;
)
Please note: as other have already pointed out, the compiler gently provides a default copy constructor for you, but this is a technical artifact that has nothing to do with the above distinction.