When execution reaches the return 0; the ABook object is no longer needed by the application. The compiler generates a call to the destructor.
Declaring Classes
Everything between Class Book and the } is the class declaration. This class has two private members, both of type int. These are private because the default access to class members is private.The public: directive tells the compiler that access from here on is public. Without this, it would still be private and prevent the three lines in the main() function from accessing Abook members. Try commenting the public: line out and recompiling to see the ensuing compile errors.
This line below declares a Constructor. This is the function called when the object is first created.
Book( int Numpages) ; // ConstructorIt is called from the line
Book ABook(128) ;This creates an object called ABook of type Book and calls the Book() function with the parameter 128.
Note : On the next page : Learn about Constructors.

