To create a working copy of a class you simply copy the class definition.struct A { int data; }; // original classstruct B { int data; }; // copy of the classHowever, it makes no practical sense to have two copies of the same class. Remember that a class is nothing more than a type definition and we only ever need one definition for any given type. If we copy a class, we actually define two completely independent types. A and B are not of the same type, even though their implementations are completely identical in every way. The names alone are what actually differentiate them.Once defined, we can use the exact same definition in any program that requires it without copying it. If we choose to copy classes rather than reuse existing ones, we only increase the maintenance burden because any changes to one copy will have to be replicated in all the copies (assuming we wish all copies to behave identically), and that can quickly lead to inconsistencies.To avoid the need for copies, we simply place the class definition in a header file which can then be included (using the #include compiler directive) in any program that requires it. The class implementation is (usually) placed in a corresponding source file which must also be part of the compilation but if we wish to use the class in more than one program then we can simply compile the source as a library and link to the library instead.