programminga general overview is marked as an accessor but has an implementation that changes the value of any data membera compiler error is generated separation of interface and implementation the class in figure contains all the correct syntactic constructs howeverin +it is more common to separate the class interface from its implementation the interface lists the class and its members (data and functionsthe implementation provides implementations of the functions figure shows the class interface for intcellfigure shows the implementationand figure shows main routine that uses the intcell some important points follow preprocessor commands the interface is typically placed in file that ends with source code that requires knowledge of the interface must #include the interface file in our casethis is both the implementation file and the file that contains main occasionallya complicated project will have files including other filesand there is the danger that an interface might be read twice in the course of compiling file this can be illegal to guard against thiseach header file uses the preprocessor to define symbol when the class interface is read this is shown on the first two lines in figure the symbol nameintcell_hshould not appear in any other fileusuallywe construct it from the filename the first line of the interface file #ifndef intcell_h #define intcell_h /* class for simulating an integer memory cell *class intcell publicexplicit intcellint initialvalue )int readconstvoid writeint )privateint storedvalue}#endif figure intcell class interface in file intcell data members can be marked mutable to indicate that const-ness should not apply to them