Skip to main content

An Introduction to Inheritance

  • Chapter
Object Oriented Programming Using C++

Part of the book series: Macmillan Computer Science Series ((COMPSS))

  • 131 Accesses

Abstract

Our first program in chapter 3 would normally be typed into a single computer file and presented to the compiler for translation and execution to produce the required results. However, we could separate the object class definition and member function definitions from the function main. Let us say that we put the defintions in a file called message.h and the function main in the file called hello_m.cpp. The file message.h is known as a header file and its contents are shown in figure 4.1. The contents of the program file, hello_m.cpp, are shown in figure 4.2.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Copyright information

© 1997 J.P Pardoe and M.J. King

About this chapter

Cite this chapter

Pardoe, J., King, M. (1997). An Introduction to Inheritance. In: Object Oriented Programming Using C++. Macmillan Computer Science Series. Palgrave, London. https://doi.org/10.1007/978-1-349-14449-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-1-349-14449-5_4

  • Publisher Name: Palgrave, London

  • Print ISBN: 978-0-333-69241-7

  • Online ISBN: 978-1-349-14449-5

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics