Class implementation file

The purpose of this structure is to keep the implementation code hidden, but allow the user to view the design.

[2][3] Users make use of the public interface of an object so as to make creating objects as simple as possible, ensuring that client code does not distract the user with unnecessary details of the class's implementation.

[4] This allows the user the information needed to use the class effectively, but prevents him or her from damaging the compiled code.

[10][11] An example of the structure of example_class.cc would look like this: In this example, the implementation for the functions has been omitted, but the functions must be declared in example_class.h like this:[12] Another example of how a class implementation file would be structured can be seen with Objective-C, which is used in iOS programming.

In C++ it will be .cpp[14] and in Objective-C it will be .m,[15] but both will use the same .h extension for their header file(s)[16][17] as shown in the example below.