A compiler provides default constructor which is a parameterless and a default copy constructor which does shallow copy.
class MyClass {
int A, B;
public:
MyClass() {}
MyClass(MyClass &src) : A(src.B), B(src.A) { }
MyClass(int a, int b) : A(a), B(b) { }
};
MyClass c0;
MyClass c1(2, 4);
MyClass c2 = c1;
If first two constructors are not supplied, they are assumed by default.
To initialize c0, you need first one, parameterless, to initialize c1, you need a constructor with 2 parameters (no default), to initialize c2
you need a copy constructor (A and B swapped intentionally), if you comment a copy constructor out, it will compile anyway (because the default works in this case), and A will go to A, B to B. :-)
The default constructor (the one without parameters) can be disabled by providing some dummy constructor and making it private. This is a known way artificially disable the ability to construct an instance at all -- especially needed because there are no notion of abstract class in C++