Advertisement

From C to C++

  • Dietrich W. R. Paulus
  • Joachim Hornegger
Chapter
Part of the Vieweg Advanced Studies in Computer Science book series (VASCS)

Abstract

In this chapter we do a quick transition from C to C++, treating C++ as an extension of ANSI-C [Joh93]. It will enable readers to write very simple C++ programs.1 As stated in the introduction, the description of the language does not cover all the details: the syntax definitions are incomplete with respect to the language definition; they are complete, however, in the sense that they contain all the applications which can be found in this book. In Sect. 2.1 we introduce some notation to be used throughout this volume. In Sect. 2.2 we explain the basic principles for compilation and in Sect. 2.3 we show simple function calls. Some C++ extensions to C declaration syntax are listed in Sect. 2.4. In the remaining sections of this chapter we describe basic features of C and set them in a new context for C++. Sect. 2.5 describes standard formatted input and output which is part of the C programming language and available in C++ as well. Basic data types, the main program, function definition, and scope are described in the final sections.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Fachmedien Wiesbaden 1997

Authors and Affiliations

  • Dietrich W. R. Paulus
    • 1
  • Joachim Hornegger
    • 1
  1. 1.ErlangenGermany

Personalised recommendations