See the highlighted portion (in yellow) the definition of copyConstructor at http://libraryofcprograms.blogspot.com/2013/03/copyconstructor.html
Why haven't we used obj.getX() ?
void a::copyConstructor(a &obj){
x = obj.x; //should have used obj.getX() because we're accessing a private member of obj?
}